From 3c386809a7a3eb0c314f7b12b0baf1cc56275856 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Fri, 23 Mar 2018 20:08:54 +0100 Subject: [PATCH] Is #700 - change script parsing if in html5 mode --- src/lexer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lexer.c b/src/lexer.c index 3d6a489..ca66aee 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -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);