Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
TinyMCE Ampersand not double encoding in DCR
Migrateduser
On one of our servers the ampersand character is not getting property encoded into the DCR, one server is fine the other fails.
I have a DCR which defines a single textarea and uses tinyMCE as the editor.
When a user enters content containing an ampersand character and I view the resulting raw DCR in an editor I see:
<rich-text>
<html><p>This is a test & something</p></html>
</rich-text>
Notice the ampersand in the content body is incorrectly encoded as a single ampersand, it should be rendered as:
&amp;
This means that when this DCR is rendered through our SitePublisher page using an XSLT with disable-output-escaping="true" I should end up with final output as:
<p>This is a test & something</p>
So to recap: On one server the DCR is saved with the ampersands correctly double encoded - and on another the ampersand is only encoded once. The ampersand needs to be rendered out like this because we need to output a valid xhtml file which we then post process by reading it into a Dom4J doc - if the final render contains a single unencoded ampersand the Dom parser will throw an exception: org.dom4j.DocumentException: The entity name must immediately follow the '&' in the entity reference.
Has anyone else seen this or know of a setting that controls this - I've done comparisons of the following files which might be controlling this and found either none or only very minor differences;
Files compared:
/etc/iw.cfg
/httpd/iw/tinymce/jscripts/tiny_mce/tiny_mce_popup.js
/httpd/iw/tinymce/jscripts/tiny_mce/tiny_mce_src.js
/httpd/iw/tinymce/jscripts/tiny_mce/tiny_mce.js
/local/config/file_encoding.cfg
I did find a difference in the xml100.jar in
/httpd/webapps/content_center/WEB-INF/lib but I don't want to start comparing all the jars just yet!
Both Servers:
Interwoven TeamSite 6.7.2 Service Pack 2 70044
Find more posts tagged with
Comments
There are no comments yet