Merge pull request #703 from htacg/issue-700

Is #700 - change script parsing if in html5 mode - PR #703
This commit is contained in:
Geoff McLane 2018-04-19 18:59:12 +02:00 committed by GitHub
commit 6ca145a646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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);