On Thu, 2010-08-26 at 13:56 -0700, Dan Jacka wrote:
> Tom Gross wrote:
> > 1. How can inline JavaScript be included? The Usecase is: PloneFormGen
> > allows to incect arbitrary (javascript) code into a form with the
> > HeaderInjection-field. If the field is rendered with an HTML comment
> > '<!--' the whole script is ignored. If the HTML comment is omitted the
> > script is enclosed with <![CDATA[ ... ]]> and the browser can't
> > interpret the script.
> Another example of the same problem: the criterion edit form
> (criterion_edit_form.cpt) in Products.ATContentTypes. The jQuery that
> controls available field types is inline, wrapped in commented CDATA.
what i did with deliverance was to externalize the javascript into a
javascript file in the theme-directory and include it via
deliverance-rules into the output html. that won't work if the
javascript to be included is dynamic, as it might be in the case of
PloneFormGen.
>
>
> // <![CDATA[
> .
> alert('actual script here')
> .
> // ]]>
>
>
> Through XDV, the browser gets:
>
>
> <![CDATA[
> // <![CDATA[
> .
> alert('actual script here')
> .
> // ]]]]><![CDATA[>
> ]]>
>
>
> I'm using xdv 0.4b2 and collective.xdv 1.0rc10 on Plone 3.3.5.
>
> Dan
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers