plone / plone.app.mosaic

Plone Mosaic main repository
https://pypi.python.org/pypi/plone.app.mosaic
GNU General Public License v2.0
35 stars 26 forks source link

Mosaic tile not interpreting html tags in script tag #424

Open yleclanche opened 6 years ago

yleclanche commented 6 years ago

I'm using mustache template in a mosaic tile. When the page is rendering, the html content of the mustache template is displayed as raw html instead of being interpreted.

Any idea why and how to fix this ?

Thanks.

fredvd commented 6 years ago

AFAIK the tile are rendered using ZPT (zope page templates, not Mustache). Or maybe you mean something different. Can you post the template here?

yleclanche commented 6 years ago

Sorry, I was not very explicit. I use ZPT for the mosaic tile. But inside my template code, I have some mustache code too.

The issue was in plone.app.blocks-4.1.1-py2.7.egg/plone/app/blocks/utils.py in the resolve function. The content of the tiles are sent to the elementtree html parser. I guess html tags in a script tags is not valid so tags are escaped.

The solution is a bit ugly. I replaced all my Githubissues.

  • Githubissues is a development platform for aggregating issues.