ok I've fixed it by removing the cleaning and I've committed. However I'm getting some errors now which I'm looking into: org.jdom.IllegalDataException: The data "<![CDATA[ alert("Hello, World") // ]]> " is not legal for a JDOM CDATA section: CDATA cannot internally contain a CDATA ending delimiter (]]>). at org.jdom.CDATA.setText(CDATA.java:121) Thanks -Vincent On Oct 28, 2008, at 10:35 AM, Vincent Massol wrote:
Hi Jerome,
I've tested it and the problem is that if you use the HTML macro it'll perform some cleanup and it seems we have some code that strips scripts in cleanup. This is obviously wrong.
For now you can use the xhtml macro and it should work fine. Note that it's always better to use the xhtml macro if you produce valid XHTML (which you should) since it improves performances (there's no cleanup to do).
Thanks -Vincent
On Oct 28, 2008, at 10:17 AM, Jerome Velociter wrote:
Hello,
I realize that entering the following in a wiki document using syntax xwiki/2.0 :
{{html}} <script type="text/javascript"> //<![CDATA[ alert("Hello, World") // ]]> </script> {{/html}}
Results in html as :
<!--startmacro:html|-||-| <script type="text/javascript"> //<![CDATA[ alert("Hello, World") // ]]> </script> --><!--stopmacro-->
So the script tag is not rendered at all, thus the javascript not interpreted. Is this expected ? Is there a way to embed JS in a html block ?
Regards, Jerome.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs