Some older script inlined in html legacy docs looks like

<scr1pt >
<!--
javascript code includes < & >
// -->
</scr1pt>

I haven't found the right combination of cdata rewrites (cdata-escape-sections?) to pass this through the pipeline safely.
It comes out looking like

<scr1pt >
&lt;!--
javascript code includes &lt; &amp; >
// -->
</scr1pt>

Input looking like this will probably fail.

I think I want to end up with

<scr1pt >
<!-- // <[CDATA[
javascript code includes < & >
// ]]> -->
</scr1pt>

??

The current version of htmltidy gives me

<scr1pt >
//<[CDATA[
javascript code includes < & >
// ]]>
</scr1pt>

... seems we don't need comments to hide script no more?

Comments

dman’s picture

Status: Active » Closed (fixed)

Recent versions of HTML TIDY fix the problem.
There's an option in importhtml settings to strip all inline scripts altogether for older platforms if needed.
Non-critical any more.