[kupu-dev] kupu html-escapes the contents of the <script> and <noscript> tags

Antoine Brenner pythonjob at gymglish.com
Sun Mar 16 19:38:15 CET 2008



Hello,

I use kupu 1.3.7-plone from Plone 2.1.3
I want to let my users edit pages that contain code in <script> and
<noscript> tags to display flash animations.
(Here is an example page:
http://www.gymglish.com/www/en/product_training_professional_elearning_courses_language_English
)

When they edit with kupu, the contents of the <script> and <noscript> tags
are html-escaped after they hit 'SUBMIT'. For example,
<noscript>
        <h1>Test</h1>
</noscript>
becomes:
<noscript>
        &lt;h1&gt;Test&lt;/h1&gt;
</noscript>

When I edit the same content with an external editor, I can keep the
contents of the tags non-escaped. Moreover, watching the HTTP POST data
with wireshark showed that the escaping was done by kupu, and not at a
later stage by Plone.

My kupu configuration is very permissive (since I trust the users writing
in the pages) : there are no html filters and no blacklists.

All this should mean that patching kupu/common/kupucontentfilters.js is
what I need. However I am not confident with how to do this...

Thus two questions:
1) Is it correct that kupucontentfilters.js is to be modified ?
if yes:
2) How should I modify kupucontentfilters.js so that the contents of the
<script> and <noscript> tags are left unchanged ?


Best regards,
Antoine

-- 
Antoine Brenner

GymGlish
http://www.gymglish.com - http://www.delavignecorp.com



More information about the kupu-dev mailing list