23486 Posts in 18995 Topics by 2878 members
|Go to End|
29 September 2010 at 6:15am
We have been working with SilverStripe and Really like it, but I am having issues with script and iframe tags. I was going to look into this to see if I could fix it and submit a patch, but am finding that I don't even know where to start.
The problem is that for browser compatibility the script and iframe tags can not be shortened and must have end tags. So <script src="..." /> is not valid, but <script src="..."></script> is.
I began by assuming that TinyMCE was the source of the problem, but after looking at the post messages I found that the script tag is being submitted properly. Therefore something in silverstripe appears to be cleaning up the xhtml and changing these tags.
An Example of the unencoded post data follows:
Can someone tell me what I can read to understand the flow of submitted data through the CMS. I need to know what happens when data is submitted so that I can determine what is altering these tags.
Also, in a post someone else mentions that <![CDATA]> tags are added around content within <script> tags, but I don't see this in the data being submitted to the server so I would assume the server is adding these as well. However, I can not find where this code is modified.
Any insight appreciated.
29 September 2010 at 5:35pm
Perhaps try enabling (or disabling?) the ContentNegotiator class, that handles transforming xhtml - html for the core. http://api.silverstripe.org/2.4/sapphire/control/ContentNegotiator.html
30 September 2010 at 5:24am Last edited: 30 September 2010 5:24am
OK, I am not certain that i did this correctly?
how does one go about disabling this class. I tried adding ContentNegotiator::disable(); in my mysite/_config.php script. I also, tried entering ContentNegotiator::enable(); neither changed the result.
Is there any documentation that states what methods are called to process the data from an HTMLText field when the data is submitted?
|Go to Top|