plone / Products.PortalTransforms

Provides MIME types based transformation chains on Plone Archetypes contents
4 stars 15 forks source link

Text transforms should "usually" return native strings #37

Closed ale-rt closed 5 years ago

ale-rt commented 5 years ago

The current interface says "usually a string": https://github.com/plone/Products.PortalTransforms/blob/21af9be0460e7e7218dc6b25e57b038729789dc2/Products/PortalTransforms/interfaces.py#L12

The Python 3 porting PR #35 changed the returned value to text.

See also: https://community.plone.org/t/products-portaltransforms-data-datastream-getdata-changes/7373

ale-rt commented 5 years ago

Probably also #36 was a change needed to fix the fact that on Py3 we are now returning unicode.

hvelarde commented 5 years ago

@plone/release-team can we have a new release with this fix? seems others are having this issue on their sites.

esteele commented 5 years ago

@hvelarde Released as 3.1.5

mauritsvanrees commented 5 years ago

For the record, I am seeing this problem too on Plone 5.1.4 when viewing a document that was migrated from Plone 4 with transmogrifier (automatically turning ATDocument into a plone.app.contenttypes dexterity Document). Problem was that the text field contained <html, which meant utils.body_finder was called on it, which turned it into unicode since version 3.1.4. I confirm that 3.1.5 fixes it, so thanks!