plone.outputfilters


Nameplone.outputfilters JSON
Version 5.0.4 PyPI version JSON
download
home_pagehttp://github.com/plone/plone.outputfilters
SummaryTransformations applied to HTML in Plone text fields as they are rendered
upload_time2023-07-13 21:53:34
maintainer
docs_urlNone
authorDavid Glick, Plone Foundation
requires_python>=3.8
licenseGPL
keywords plone transform filter uid caption
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

``plone.outputfilters`` provides a framework for registering filters that
get applied to text as it is rendered.

By default, these filters are wired up to occur when text is transformed from
the text/html mimetype to the text/x-html-safe mimetype via the
PortalTransforms machinery.

With  the RichText field of ``plone.app.textfield``, this transform is typically applied when the field value is first accessed.
The result of the transform is then cached in a volatile attribute for an hour or until the value is replaced.


Included Filters
================

A default filter is included which provides the following features:

* Resolving UID-based links
* Adding captions to images

(These are implemented as one filter to avoid the overhead of parsing the HTML
twice.)

These features used to be provided by similar transforms in both Products.kupu
and Products.TinyMCE.  New releases of these editors are being prepared which
depend on the transform in plone.outputfilters, so that bugs don't need to be
fixed in multiple places.


Resolving UID-based links
-------------------------

Internal links may be inserted with a UID reference rather than the real path
of the item being linked.  For example, a link might look like this::

 <a href="resolveuid/6992f1f6-ae36-11df-9adf-001ec2a8cdf1">

Such URLs can be resolved by the ``resolveuid`` view, which resolves the UID to
an object and then redirects to its URL. However, resolving links in this way
requires an extra request after the redirect. The resolveuid filter avoids that
by replacing such URLs with the object's actual full absolute URL as the link
is rendered.

UIDs are resolved using ``plone.app.uuid.utils.uuidToURL``.

The resolveuid filter is enabled if there is at least one
``plone.outputfilters.filters.resolveuid_and_caption.IResolveUidsEnabler``
utility whose ``available`` property returns ``True``.  This mechanism exists
for compatibility with TinyMCE and kupu, which both provide their own control
panel setting to enable the link-by-uid feature.


Image captioning
----------------

Image tags with the "captioned" class and a ``src`` attribute that resolves to
an image object within the site will be wrapped in a definition list (DL) tag
which includes a caption based on the value of the image's ``description``
field, if any.

For example, this image tag::

 <img src="path/to/image" class="captioned"/>

might be transformed into::

  <dl class="captioned">
   <dt><img src="path/to/image"/></dt>
   <dd class="image-caption">Caption text</dd>
  </dl>

assuming the image found at "path/to/image" has the description "Caption text".

The captioning filter is enabled if there is at least one
``plone.outputfilters.filters.resolveuid_and_caption.IImageCaptioningEnabler``
utility whose ``available`` property returns ``True``.  This mechanism exists
for compatibility with TinyMCE and kupu, which both provide their own control
panel setting to enable the captioning feature.

The captioned version of an image is rendered using the
``@@plone.outputfilters_captioned_image`` view, which may be overridden to
customize the caption.  This view is passed the following kwargs:

class
  The CSS class on the image.
originalwidth
  The ``width`` attribute of the image tag.
originalalt
  The ``alt`` attribute of the image tag.
url_path
  The path of the image, relative to the site root.
caption
  The image's description.
image
  The (possibly scaled) image object.
fullimage
  The original unscaled image object.
tag
  A full HTML tag which displays the image.
isfullsize
  True if ``image`` is ``fullimage``.
width
  The width of ``image``.

Adding a custom filter
======================

As an example, the following filter replaces all doubled hyphens ("--") with em
dashes ("-"). (Don't use the example verbatim, because it doesn't parse HTML to
apply itself only to text nodes, so will mangle HTML comments.)

A filter is a callable which accepts a UTF-8-encoded HTML string as input, and
returns a modified UTF-8-encoded HTML string. A return value of ``None`` may be
used to indicate that the input should not be modified.

Example::

    import re
    from zope.interface import implementer
    from plone.outputfilters.interfaces import IFilter

    @implementer(IFilter)
    class EmDashAdder(object):
        order = 1000

        def __init__(self, context, request):
            pass

        def is_enabled(self):
            return True

        pattern = re.compile(r'--')

        def __call__(self, data):
            return self.pattern.sub('—', data)

The ``order`` attribute may be used to affect the order in which filters are
applied (higher values run later). The is_enabled method should return a boolean
indicating whether the filter should be applied.

Filters are registered in ZCML as a named multi-adapter of the context and
request to IFilter::

    >>> from Zope2.App import zcml
    >>> import Products.Five
    >>> configure = """
    ... <configure
    ...     xmlns="http://namespaces.zope.org/zope">
    ...
    ...   <adapter
    ...     name="em_dash_adder"
    ...     provides="plone.outputfilters.interfaces.IFilter"
    ...     for="* *"
    ...     factory="plone.outputfilters.filters.example.EmDashAdder"
    ...     />
    ...
    ... </configure>
    ... """
    >>> zcml.load_config("configure.zcml", Products.Five)
    >>> zcml.load_string(configure)

Now when text is transformed from text/html to text/x-html-safe, the filter will
be applied::

    >>> app = layer['app']
    >>> portal = layer['portal']
    >>> str(portal.portal_transforms.convertTo('text/x-html-safe',
    ...     'test--test', mimetype='text/html', context=portal))
    'test—test'


How it works
============

``plone.outputfilters`` hooks into the PortalTransforms machinery by installing:

1. a new mimetype ("text/x-plone-outputfilters-html")
2. a transform from text/html to text/x-plone-outputfilters-html
3. a null transform from text/x-plone-outputfilters-html back to text/html
4. a "transform policy" for the text/x-html-safe mimetype, which says that text
   being transformed to text/x-html-safe must first be transformed to
   text/x-plone-outputfilters-html

The filter adapters are looked up and applied during the execution of the
transform from step #2.

This should be considered an implementation detail and may change at some point
in the future.


Changelog
=========

.. You should *NOT* be adding new change log entries to this file.
   You should create a file in the news directory instead.
   For helpful instructions, please see:
   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst

.. towncrier release notes start

5.0.4 (2023-07-13)
------------------

Bug fixes:


- Call registry once per filter rather than for each img tag.
  [gotcha] (less_call_to_registry)


Internal:


- Update configuration files.
  [plone devs] (7723aeaf)


5.0.3 (2023-06-16)
------------------

Bug fixes:


- Return a 404 Not Found response if the resolveuid view is called with no uuid. @davisagli (#43)


5.0.2 (2023-04-14)
------------------

Internal:


- Update configuration files.
  [plone devs] (535edb14)


5.0.1 (2023-03-21)
------------------

Internal:


- Update configuration files.
  [plone devs] (243ca9ec)


5.0.0 (2022-11-17)
------------------

Bug fixes:


- Use our new version of uuidToObject() from plone.app.uuid.utils
  [anirudhhkashyap] (#52)


5.0.0b3 (2022-09-30)
--------------------

Bug fixes:


- Do not return prettified soup after picture variants filter.
  This prevents adding unneeded newlines.
  [petschki] (#56)


5.0.0b2 (2022-09-10)
--------------------

Bug fixes:


- isort, black, pyupgrade, manual six removal. 
  [jensens] (#53)


5.0.0b1 (2022-06-23)
--------------------

New features:


- Add image_srcset output filter, to convert IMG tags into PICTURE tags with multiple source definitions as define in imaging control panel [MrTango] (#49)


4.1.0 (2022-02-23)
------------------

New features:


- Resolve UIDs in SRC= attribute of of SOURCE and IFRAME elements. (#47)


4.0.2 (2020-09-28)
------------------

Bug fixes:


- fix AttributeError: 'NoneType' object has no attribute 'unwrap' exception when a fullsize image is wrapped in an <a> tag. [flipmcf] (#39)
- Fixed deprecation warning for html_quote.
  [maurits] (#3130)


4.0.1 (2020-04-21)
------------------

Bug fixes:


- Minor packaging updates. (#1)


4.0.0 (2020-03-13)
------------------

Breaking changes:

- Change the image caption template to use ``<figure>`` and ``<figcaption>``.
  [thet]

New features:

- Add an ``ImageCaptioningEnabler`` utility which can be enabled via the portal registry setting ``plone.image_captioning``.
  [thet]

Bug fixes:

- Don't check for hard coded image size in test.
  [agitator]

- Fixed possible package install error with Python 3.6 when no system locale is set.
  See `coredev issue 642 <https://github.com/plone/buildout.coredev/issues/642#issuecomment-597008272>`_.
  [maurits]


3.1.2 (2019-03-21)
------------------

Bug fixes:

- fix UnicodeDecodeError in Python 2 when uid-linked image has
  non-ascii characters in title or description
  [petschki]


3.1.1 (2019-01-07)
------------------

Bug fixes:

- bugfix for KeyError caused by <a> elements without href attribute
  [ajung]


3.1.0 (2018-11-02)
------------------

New features:

- remove deprecated sgmllib and move to BeautifulSoup4
  [tobiasherp, petschki]


3.0.5 (2018-06-04)
------------------

Bug fixes:

- Allow resolving of links with absolute path and host
  [tomgross]

- Make plone.namedfile hard testing dependency
  [tomgross]


3.0.4 (2018-02-02)
------------------

Bug fixes:

- Add Python 2 / 3 compatibility
  [pbauer]


3.0.3 (2017-08-04)
------------------

Bug fixes:

- update test to reflect changes in PortalTransforms
  [MrTango]

3.0.2 (2017-07-03)
------------------

Bug fixes:

- Remove unittest2 dependency
  [kakshay21]

3.0.1 (2017-02-05)
------------------

Bug fixes:

- Do not transform a and img tags when inside script tag.
  [gotcha]


3.0.0 (2016-08-19)
------------------

Breaking changes:

- Give up support of PortalTransforms 1.x with old style interfaces.
  [jensens]

Bug fixes:

- Handle unicode errors in img attributes
  [vangheem]
- Cleanup: utf8-headers, isort, pep8
  [jensens]

- Use zope.interface decorator.
  [gforcada]


2.1.5 (2016-06-07)
------------------

Bug fixes:

- Make tests work with old and new safe HTML transform
  [tomgross]


2.1.4 (2016-05-10)
------------------

Fixes:

- Explicitly exclude ``mailto:`` links from being UID-resolved.
  [thet]

- Fix test isolation problem.
  [thet]


2.1.3 (2016-03-07)
------------------

New:

- Added ``tel:`` to ignored link types.
  [julianhandl]


2.1.2 (2015-12-15)
------------------

Fixes:

- Fixed error when uid resolving if object got didn't have
  absolute_url method.
  [Gagaro]

2.1.1 (2015-11-25)
------------------

Fixes:

- Fixed case where unicode ends up getting used when resolving
  img tags and (un)restrictedTraverse doesn't work with unicode.
  [vangheem]


2.1 (2015-07-18)
----------------

- Remove kupu BBB code.
  [gforcada]


2.0 (2015-03-13)
----------------

- For full-size (non-scaled) plone.app.contenttypes images,
  preserve height/width specified in img tag attributes.
  [davisagli]

- Convert tests to plone.app.testing
  [tomgross]


1.14 (2014-04-22)
-----------------

- for plone 5, always resolveuids
  [vangheem]


1.13 (2014-04-13)
-----------------

- #12783 img tag referencing non existent scales leads to transform error
  [anthonygerrard]


1.12 (2014-01-27)
-----------------

- Nothing changed yet.


1.11.1 (2013-07-19)
-------------------

- Fix README rst.
  [gotcha]


1.11 (2013-07-19)
-----------------

- img unicode issue : fix resolve_image to avoid that it returns unicode
  [gotcha]

- handle possibility of img tag being unicode to prevent unicode errors
  [vangheem]


1.10 (2013-05-23)
-----------------

- Work around bug in SGMLParser to handle singleton tags correctly.
  [tom_gross]


1.9 (2013-04-06)
----------------

- If we have an image description it should go into the alt text of the img
  tag
  [ale-rt]


1.8 (2012-12-10)
----------------

- Fix packaging issue.
  [esteele]


1.7 (2012-12-09)
----------------

- When resolving images, only look upward for the full image if the
  image that was traversed is not a content item (i.e. is a scale).
  [davisagli, datakurre]

- Also convert "resolveUid/" links (big 'U') that FCKeditor used to create.
  [hacklschorsch]

- Also escape double quotes, fixes #13219
  [maartenkling]

1.6 (2012-08-16)
----------------

- Don't break if an @@images scale can't be resolved for some reason.
  [davisagli]


1.5 (2012-08-15)
----------------

- Restore compatibility with Plone 4.0 when plone.outputfilters is present.
  [davisagli]


1.4 (2012-08-04)
----------------

- Fix incompatibilities with plone.namedfile
  [do3cc]


1.3 (2012-05-25)
----------------

- Fixed testing error by moving the part of README.rst to
  plone/outputfilters/README.txt.
  [maurits]

- Small pep8 update
  [pbdiode]


1.2 - 2012-04-09
----------------

- Prevent transformation of links to anchors on the same page.
  [davisagli]

- Fixed undefined uuid variable in kupu_resolveuid_hook branch
  in resolveuid view.
  [vincentfretin]

- Make sure links to expired objects can still be resolved by the resolveuid view.
  [davisagli]

- alt/title attributes on img tags were not present if tinymce uid linking was not used
  [iElectric]

- When making relative URIs absolute, use the parent as the relative
  root when the context is not folderish.  Fixes an issue where
  relative URLs from Plone 3, for example, had the wrong URLs under
  Plone 4 when a default page was used for a folder.
  [rossp]

- Fixed testing error when packaged with a missing README.rst.
  [maurits]


1.1 - 2011-11-21
----------------

- Fixed resolving of protected objects for AT content
  [tom_gross]

- Fixed resolving of relative ../resolveuid/... links
  [tom_gross]

- Respect implementation differences in Python 2.4 and
  Python 2.6 sgmlparser
  [tom_gross]

- Fixed resolving of images in protected folders for captioning
  [mj]


1.0 - 2011-05-13
----------------

- Release 1.0 Final.
  [esteele]

- Add MANIFEST.in.
  [WouterVH]


1.0b5 - 2011-03-24
------------------

- Make captioning and linking work with new style image scales.
  [elro]

- General refactoring of link resolution.
  [elro]


1.0b4 - 2011-03-22
------------------

- Add alt and title tags to images.
  [elro]

- Get various image properties from the imaging view to work better with
  Dexterity.
  [elro]

- small fix so it is possible to create object without need of REQUEST or
  without need of mocking it.
  [garbas]


1.0b3 - 2011-02-24
------------------

- Resolve image paths beginning with a slash relative to the Plone site root.
  [davisagli]

- Support image captioning for new-style image scales using the @@images view.
  [davisagli]


1.0b2 - 2011-01-11
------------------

- Fix resolveuid so that uid resolution occurs after authentication.
  [elro]

- Please remember to run tests before checking in!
  [elro]

- Fix issue where resolving links with subpaths resulted in a reversed
  subpath.
  [elro]


1.0b1 - 2011-01-25
------------------

- Fix issue with resolving resolveuid links with subpaths. This fixes
  http://dev.plone.org/plone/ticket/11426
  [davisagli]


1.0a1 - 2011-01-03
------------------

- Initial implementation.
  [davisagli]

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/plone/plone.outputfilters",
    "name": "plone.outputfilters",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "plone transform filter uid caption",
    "author": "David Glick, Plone Foundation",
    "author_email": "davidglick@groundwire.org",
    "download_url": "https://files.pythonhosted.org/packages/40/94/5b480acee631b9062ccb6051a7dd79bdce11437161aa52a973625cbbe09e/plone.outputfilters-5.0.4.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n``plone.outputfilters`` provides a framework for registering filters that\nget applied to text as it is rendered.\n\nBy default, these filters are wired up to occur when text is transformed from\nthe text/html mimetype to the text/x-html-safe mimetype via the\nPortalTransforms machinery.\n\nWith  the RichText field of ``plone.app.textfield``, this transform is typically applied when the field value is first accessed.\nThe result of the transform is then cached in a volatile attribute for an hour or until the value is replaced.\n\n\nIncluded Filters\n================\n\nA default filter is included which provides the following features:\n\n* Resolving UID-based links\n* Adding captions to images\n\n(These are implemented as one filter to avoid the overhead of parsing the HTML\ntwice.)\n\nThese features used to be provided by similar transforms in both Products.kupu\nand Products.TinyMCE.  New releases of these editors are being prepared which\ndepend on the transform in plone.outputfilters, so that bugs don't need to be\nfixed in multiple places.\n\n\nResolving UID-based links\n-------------------------\n\nInternal links may be inserted with a UID reference rather than the real path\nof the item being linked.  For example, a link might look like this::\n\n <a href=\"resolveuid/6992f1f6-ae36-11df-9adf-001ec2a8cdf1\">\n\nSuch URLs can be resolved by the ``resolveuid`` view, which resolves the UID to\nan object and then redirects to its URL. However, resolving links in this way\nrequires an extra request after the redirect. The resolveuid filter avoids that\nby replacing such URLs with the object's actual full absolute URL as the link\nis rendered.\n\nUIDs are resolved using ``plone.app.uuid.utils.uuidToURL``.\n\nThe resolveuid filter is enabled if there is at least one\n``plone.outputfilters.filters.resolveuid_and_caption.IResolveUidsEnabler``\nutility whose ``available`` property returns ``True``.  This mechanism exists\nfor compatibility with TinyMCE and kupu, which both provide their own control\npanel setting to enable the link-by-uid feature.\n\n\nImage captioning\n----------------\n\nImage tags with the \"captioned\" class and a ``src`` attribute that resolves to\nan image object within the site will be wrapped in a definition list (DL) tag\nwhich includes a caption based on the value of the image's ``description``\nfield, if any.\n\nFor example, this image tag::\n\n <img src=\"path/to/image\" class=\"captioned\"/>\n\nmight be transformed into::\n\n  <dl class=\"captioned\">\n   <dt><img src=\"path/to/image\"/></dt>\n   <dd class=\"image-caption\">Caption text</dd>\n  </dl>\n\nassuming the image found at \"path/to/image\" has the description \"Caption text\".\n\nThe captioning filter is enabled if there is at least one\n``plone.outputfilters.filters.resolveuid_and_caption.IImageCaptioningEnabler``\nutility whose ``available`` property returns ``True``.  This mechanism exists\nfor compatibility with TinyMCE and kupu, which both provide their own control\npanel setting to enable the captioning feature.\n\nThe captioned version of an image is rendered using the\n``@@plone.outputfilters_captioned_image`` view, which may be overridden to\ncustomize the caption.  This view is passed the following kwargs:\n\nclass\n  The CSS class on the image.\noriginalwidth\n  The ``width`` attribute of the image tag.\noriginalalt\n  The ``alt`` attribute of the image tag.\nurl_path\n  The path of the image, relative to the site root.\ncaption\n  The image's description.\nimage\n  The (possibly scaled) image object.\nfullimage\n  The original unscaled image object.\ntag\n  A full HTML tag which displays the image.\nisfullsize\n  True if ``image`` is ``fullimage``.\nwidth\n  The width of ``image``.\n\nAdding a custom filter\n======================\n\nAs an example, the following filter replaces all doubled hyphens (\"--\") with em\ndashes (\"-\"). (Don't use the example verbatim, because it doesn't parse HTML to\napply itself only to text nodes, so will mangle HTML comments.)\n\nA filter is a callable which accepts a UTF-8-encoded HTML string as input, and\nreturns a modified UTF-8-encoded HTML string. A return value of ``None`` may be\nused to indicate that the input should not be modified.\n\nExample::\n\n    import re\n    from zope.interface import implementer\n    from plone.outputfilters.interfaces import IFilter\n\n    @implementer(IFilter)\n    class EmDashAdder(object):\n        order = 1000\n\n        def __init__(self, context, request):\n            pass\n\n        def is_enabled(self):\n            return True\n\n        pattern = re.compile(r'--')\n\n        def __call__(self, data):\n            return self.pattern.sub('\u2014', data)\n\nThe ``order`` attribute may be used to affect the order in which filters are\napplied (higher values run later). The is_enabled method should return a boolean\nindicating whether the filter should be applied.\n\nFilters are registered in ZCML as a named multi-adapter of the context and\nrequest to IFilter::\n\n    >>> from Zope2.App import zcml\n    >>> import Products.Five\n    >>> configure = \"\"\"\n    ... <configure\n    ...     xmlns=\"http://namespaces.zope.org/zope\">\n    ...\n    ...   <adapter\n    ...     name=\"em_dash_adder\"\n    ...     provides=\"plone.outputfilters.interfaces.IFilter\"\n    ...     for=\"* *\"\n    ...     factory=\"plone.outputfilters.filters.example.EmDashAdder\"\n    ...     />\n    ...\n    ... </configure>\n    ... \"\"\"\n    >>> zcml.load_config(\"configure.zcml\", Products.Five)\n    >>> zcml.load_string(configure)\n\nNow when text is transformed from text/html to text/x-html-safe, the filter will\nbe applied::\n\n    >>> app = layer['app']\n    >>> portal = layer['portal']\n    >>> str(portal.portal_transforms.convertTo('text/x-html-safe',\n    ...     'test--test', mimetype='text/html', context=portal))\n    'test\u2014test'\n\n\nHow it works\n============\n\n``plone.outputfilters`` hooks into the PortalTransforms machinery by installing:\n\n1. a new mimetype (\"text/x-plone-outputfilters-html\")\n2. a transform from text/html to text/x-plone-outputfilters-html\n3. a null transform from text/x-plone-outputfilters-html back to text/html\n4. a \"transform policy\" for the text/x-html-safe mimetype, which says that text\n   being transformed to text/x-html-safe must first be transformed to\n   text/x-plone-outputfilters-html\n\nThe filter adapters are looked up and applied during the execution of the\ntransform from step #2.\n\nThis should be considered an implementation detail and may change at some point\nin the future.\n\n\nChangelog\n=========\n\n.. You should *NOT* be adding new change log entries to this file.\n   You should create a file in the news directory instead.\n   For helpful instructions, please see:\n   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n\n.. towncrier release notes start\n\n5.0.4 (2023-07-13)\n------------------\n\nBug fixes:\n\n\n- Call registry once per filter rather than for each img tag.\n  [gotcha] (less_call_to_registry)\n\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (7723aeaf)\n\n\n5.0.3 (2023-06-16)\n------------------\n\nBug fixes:\n\n\n- Return a 404 Not Found response if the resolveuid view is called with no uuid. @davisagli (#43)\n\n\n5.0.2 (2023-04-14)\n------------------\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (535edb14)\n\n\n5.0.1 (2023-03-21)\n------------------\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (243ca9ec)\n\n\n5.0.0 (2022-11-17)\n------------------\n\nBug fixes:\n\n\n- Use our new version of uuidToObject() from plone.app.uuid.utils\n  [anirudhhkashyap] (#52)\n\n\n5.0.0b3 (2022-09-30)\n--------------------\n\nBug fixes:\n\n\n- Do not return prettified soup after picture variants filter.\n  This prevents adding unneeded newlines.\n  [petschki] (#56)\n\n\n5.0.0b2 (2022-09-10)\n--------------------\n\nBug fixes:\n\n\n- isort, black, pyupgrade, manual six removal. \n  [jensens] (#53)\n\n\n5.0.0b1 (2022-06-23)\n--------------------\n\nNew features:\n\n\n- Add image_srcset output filter, to convert IMG tags into PICTURE tags with multiple source definitions as define in imaging control panel [MrTango] (#49)\n\n\n4.1.0 (2022-02-23)\n------------------\n\nNew features:\n\n\n- Resolve UIDs in SRC= attribute of of SOURCE and IFRAME elements. (#47)\n\n\n4.0.2 (2020-09-28)\n------------------\n\nBug fixes:\n\n\n- fix AttributeError: 'NoneType' object has no attribute 'unwrap' exception when a fullsize image is wrapped in an <a> tag. [flipmcf] (#39)\n- Fixed deprecation warning for html_quote.\n  [maurits] (#3130)\n\n\n4.0.1 (2020-04-21)\n------------------\n\nBug fixes:\n\n\n- Minor packaging updates. (#1)\n\n\n4.0.0 (2020-03-13)\n------------------\n\nBreaking changes:\n\n- Change the image caption template to use ``<figure>`` and ``<figcaption>``.\n  [thet]\n\nNew features:\n\n- Add an ``ImageCaptioningEnabler`` utility which can be enabled via the portal registry setting ``plone.image_captioning``.\n  [thet]\n\nBug fixes:\n\n- Don't check for hard coded image size in test.\n  [agitator]\n\n- Fixed possible package install error with Python 3.6 when no system locale is set.\n  See `coredev issue 642 <https://github.com/plone/buildout.coredev/issues/642#issuecomment-597008272>`_.\n  [maurits]\n\n\n3.1.2 (2019-03-21)\n------------------\n\nBug fixes:\n\n- fix UnicodeDecodeError in Python 2 when uid-linked image has\n  non-ascii characters in title or description\n  [petschki]\n\n\n3.1.1 (2019-01-07)\n------------------\n\nBug fixes:\n\n- bugfix for KeyError caused by <a> elements without href attribute\n  [ajung]\n\n\n3.1.0 (2018-11-02)\n------------------\n\nNew features:\n\n- remove deprecated sgmllib and move to BeautifulSoup4\n  [tobiasherp, petschki]\n\n\n3.0.5 (2018-06-04)\n------------------\n\nBug fixes:\n\n- Allow resolving of links with absolute path and host\n  [tomgross]\n\n- Make plone.namedfile hard testing dependency\n  [tomgross]\n\n\n3.0.4 (2018-02-02)\n------------------\n\nBug fixes:\n\n- Add Python 2 / 3 compatibility\n  [pbauer]\n\n\n3.0.3 (2017-08-04)\n------------------\n\nBug fixes:\n\n- update test to reflect changes in PortalTransforms\n  [MrTango]\n\n3.0.2 (2017-07-03)\n------------------\n\nBug fixes:\n\n- Remove unittest2 dependency\n  [kakshay21]\n\n3.0.1 (2017-02-05)\n------------------\n\nBug fixes:\n\n- Do not transform a and img tags when inside script tag.\n  [gotcha]\n\n\n3.0.0 (2016-08-19)\n------------------\n\nBreaking changes:\n\n- Give up support of PortalTransforms 1.x with old style interfaces.\n  [jensens]\n\nBug fixes:\n\n- Handle unicode errors in img attributes\n  [vangheem]\n- Cleanup: utf8-headers, isort, pep8\n  [jensens]\n\n- Use zope.interface decorator.\n  [gforcada]\n\n\n2.1.5 (2016-06-07)\n------------------\n\nBug fixes:\n\n- Make tests work with old and new safe HTML transform\n  [tomgross]\n\n\n2.1.4 (2016-05-10)\n------------------\n\nFixes:\n\n- Explicitly exclude ``mailto:`` links from being UID-resolved.\n  [thet]\n\n- Fix test isolation problem.\n  [thet]\n\n\n2.1.3 (2016-03-07)\n------------------\n\nNew:\n\n- Added ``tel:`` to ignored link types.\n  [julianhandl]\n\n\n2.1.2 (2015-12-15)\n------------------\n\nFixes:\n\n- Fixed error when uid resolving if object got didn't have\n  absolute_url method.\n  [Gagaro]\n\n2.1.1 (2015-11-25)\n------------------\n\nFixes:\n\n- Fixed case where unicode ends up getting used when resolving\n  img tags and (un)restrictedTraverse doesn't work with unicode.\n  [vangheem]\n\n\n2.1 (2015-07-18)\n----------------\n\n- Remove kupu BBB code.\n  [gforcada]\n\n\n2.0 (2015-03-13)\n----------------\n\n- For full-size (non-scaled) plone.app.contenttypes images,\n  preserve height/width specified in img tag attributes.\n  [davisagli]\n\n- Convert tests to plone.app.testing\n  [tomgross]\n\n\n1.14 (2014-04-22)\n-----------------\n\n- for plone 5, always resolveuids\n  [vangheem]\n\n\n1.13 (2014-04-13)\n-----------------\n\n- #12783 img tag referencing non existent scales leads to transform error\n  [anthonygerrard]\n\n\n1.12 (2014-01-27)\n-----------------\n\n- Nothing changed yet.\n\n\n1.11.1 (2013-07-19)\n-------------------\n\n- Fix README rst.\n  [gotcha]\n\n\n1.11 (2013-07-19)\n-----------------\n\n- img unicode issue : fix resolve_image to avoid that it returns unicode\n  [gotcha]\n\n- handle possibility of img tag being unicode to prevent unicode errors\n  [vangheem]\n\n\n1.10 (2013-05-23)\n-----------------\n\n- Work around bug in SGMLParser to handle singleton tags correctly.\n  [tom_gross]\n\n\n1.9 (2013-04-06)\n----------------\n\n- If we have an image description it should go into the alt text of the img\n  tag\n  [ale-rt]\n\n\n1.8 (2012-12-10)\n----------------\n\n- Fix packaging issue.\n  [esteele]\n\n\n1.7 (2012-12-09)\n----------------\n\n- When resolving images, only look upward for the full image if the\n  image that was traversed is not a content item (i.e. is a scale).\n  [davisagli, datakurre]\n\n- Also convert \"resolveUid/\" links (big 'U') that FCKeditor used to create.\n  [hacklschorsch]\n\n- Also escape double quotes, fixes #13219\n  [maartenkling]\n\n1.6 (2012-08-16)\n----------------\n\n- Don't break if an @@images scale can't be resolved for some reason.\n  [davisagli]\n\n\n1.5 (2012-08-15)\n----------------\n\n- Restore compatibility with Plone 4.0 when plone.outputfilters is present.\n  [davisagli]\n\n\n1.4 (2012-08-04)\n----------------\n\n- Fix incompatibilities with plone.namedfile\n  [do3cc]\n\n\n1.3 (2012-05-25)\n----------------\n\n- Fixed testing error by moving the part of README.rst to\n  plone/outputfilters/README.txt.\n  [maurits]\n\n- Small pep8 update\n  [pbdiode]\n\n\n1.2 - 2012-04-09\n----------------\n\n- Prevent transformation of links to anchors on the same page.\n  [davisagli]\n\n- Fixed undefined uuid variable in kupu_resolveuid_hook branch\n  in resolveuid view.\n  [vincentfretin]\n\n- Make sure links to expired objects can still be resolved by the resolveuid view.\n  [davisagli]\n\n- alt/title attributes on img tags were not present if tinymce uid linking was not used\n  [iElectric]\n\n- When making relative URIs absolute, use the parent as the relative\n  root when the context is not folderish.  Fixes an issue where\n  relative URLs from Plone 3, for example, had the wrong URLs under\n  Plone 4 when a default page was used for a folder.\n  [rossp]\n\n- Fixed testing error when packaged with a missing README.rst.\n  [maurits]\n\n\n1.1 - 2011-11-21\n----------------\n\n- Fixed resolving of protected objects for AT content\n  [tom_gross]\n\n- Fixed resolving of relative ../resolveuid/... links\n  [tom_gross]\n\n- Respect implementation differences in Python 2.4 and\n  Python 2.6 sgmlparser\n  [tom_gross]\n\n- Fixed resolving of images in protected folders for captioning\n  [mj]\n\n\n1.0 - 2011-05-13\n----------------\n\n- Release 1.0 Final.\n  [esteele]\n\n- Add MANIFEST.in.\n  [WouterVH]\n\n\n1.0b5 - 2011-03-24\n------------------\n\n- Make captioning and linking work with new style image scales.\n  [elro]\n\n- General refactoring of link resolution.\n  [elro]\n\n\n1.0b4 - 2011-03-22\n------------------\n\n- Add alt and title tags to images.\n  [elro]\n\n- Get various image properties from the imaging view to work better with\n  Dexterity.\n  [elro]\n\n- small fix so it is possible to create object without need of REQUEST or\n  without need of mocking it.\n  [garbas]\n\n\n1.0b3 - 2011-02-24\n------------------\n\n- Resolve image paths beginning with a slash relative to the Plone site root.\n  [davisagli]\n\n- Support image captioning for new-style image scales using the @@images view.\n  [davisagli]\n\n\n1.0b2 - 2011-01-11\n------------------\n\n- Fix resolveuid so that uid resolution occurs after authentication.\n  [elro]\n\n- Please remember to run tests before checking in!\n  [elro]\n\n- Fix issue where resolving links with subpaths resulted in a reversed\n  subpath.\n  [elro]\n\n\n1.0b1 - 2011-01-25\n------------------\n\n- Fix issue with resolving resolveuid links with subpaths. This fixes\n  http://dev.plone.org/plone/ticket/11426\n  [davisagli]\n\n\n1.0a1 - 2011-01-03\n------------------\n\n- Initial implementation.\n  [davisagli]\n",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "Transformations applied to HTML in Plone text fields as they are rendered",
    "version": "5.0.4",
    "project_urls": {
        "Homepage": "http://github.com/plone/plone.outputfilters"
    },
    "split_keywords": [
        "plone",
        "transform",
        "filter",
        "uid",
        "caption"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "175cbe51bca374874ab18be4bab58ffdb63cd699be4aaf2cbe77abf81b0c7671",
                "md5": "f78cf9f991f0232f63e376a30b6eabc9",
                "sha256": "ea7ad027128ee45ccf2a086f6cf9d9da93ed1c3f44813127b5bb5a997984029d"
            },
            "downloads": -1,
            "filename": "plone.outputfilters-5.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f78cf9f991f0232f63e376a30b6eabc9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 54038,
            "upload_time": "2023-07-13T21:53:31",
            "upload_time_iso_8601": "2023-07-13T21:53:31.690347Z",
            "url": "https://files.pythonhosted.org/packages/17/5c/be51bca374874ab18be4bab58ffdb63cd699be4aaf2cbe77abf81b0c7671/plone.outputfilters-5.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "40945b480acee631b9062ccb6051a7dd79bdce11437161aa52a973625cbbe09e",
                "md5": "6c520cf9b6a8d41284afe47f6560abf1",
                "sha256": "36309b1d511213888afcb271bed3e06d2e72ce263a76d4d1284b68d70cd6b8cb"
            },
            "downloads": -1,
            "filename": "plone.outputfilters-5.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "6c520cf9b6a8d41284afe47f6560abf1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 60004,
            "upload_time": "2023-07-13T21:53:34",
            "upload_time_iso_8601": "2023-07-13T21:53:34.119227Z",
            "url": "https://files.pythonhosted.org/packages/40/94/5b480acee631b9062ccb6051a7dd79bdce11437161aa52a973625cbbe09e/plone.outputfilters-5.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-13 21:53:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plone",
    "github_project": "plone.outputfilters",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "plone.outputfilters"
}
        
Elapsed time: 0.09157s