Is #700 - change script parsing if in html5 mode

This commit is contained in:
Geoff McLane 2018-03-23 20:08:54 +01:00
parent 0c182bbfa1
commit 3c386809a7

View file

@ -2384,7 +2384,8 @@ static Node *GetCDATA( TidyDocImpl* doc, Node *container )
/*\ if javascript insert backslash before /
* Issue #348 - Add option, escape-scripts, to skip
\*/
if ((TY_(IsJavaScript)(container)) && cfgBool(doc, TidyEscapeScripts))
if ((TY_(IsJavaScript)(container)) && cfgBool(doc, TidyEscapeScripts) &&
!TY_(IsHTML5Mode)(doc) ) /* Is #700 - This only applies to legacy html4 mode */
{
/* Issue #281 - only warn if adding the escape! */
TY_(Report)(doc, NULL, NULL, BAD_CDATA_CONTENT);