the core issue here is that liferay is removing linefeeds inside a CDATA block, which it obviously shouldnt.
-igor On Sun, May 9, 2010 at 11:48 PM, Jérôme Schell <jerome.sch...@cpe.fr> wrote: > Le 08/05/2010 22:41, Igor Vaynberg a écrit : >> strange that its a problem for nothing else but liferay... > > Hello, > > Yes but I would rather say that the problem is revealed by Liferay > because of its "remove line feeds" behavior. > I'm still wondering why the sequence added by Wicket looks like that. If > anybody has a pointer that explain in detail the sequence... > Let's try to understand the preamble: > <!--/*--> > => Add a HTML comment to hide the javascript comment opening > <![CDATA[ > => XHTML character data section (hidden from javascript by the > previous opening comment) > /* > => Another opening javascript comment (?) >> > => ? > <!-- > => Open an HTML comment to hide the javascript from old browser > */ > => Close a javascript comment (which one?) > > So if somebody can explain all that to me. > It seems odd that when putting all that on one line, the javascript > doesn't get executed. It is considered as being commented (easily > reproducible with Firebug). > > Regards, > -- > Jérôme > > >> On Fri, May 7, 2010 at 2:43 AM, Jérôme Schell <jerome.sch...@cpe.fr> wrote: >>> Hello, >>> >>> Working on integration of a wicket portlet in the upcoming Liferay 6, I >>> am currently facing a problem with the way Wicket encapsulates inline >>> javascript. >>> Looking at my page header I see that type of thing (the id have been >>> shortened to avoid line breaks): >>> <script type="text/javascript" id="**"><!--/*--><![CDATA[/*><!--*/ >>> wicketAjaxDebugEnable=true; >>> /*-->]]>*/</script> >>> >>> The thing is that Liferay now strips out the carriage returns on >>> embedded javascript, so the sequence became (shortened): >>> <!--/*--><![CDATA[/*><!--*/Code here/*-->]]>*/ >>> >>> The javascript is then not executed. >>> Seeing this, I am wondering if the comment added by Wicket is correct. >>> It seems there is not a good match between /* and */ so that would >>> explain that the code is considered as beeing commented out and so not >>> executed... > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org