1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
From: Geoff McLane <ubuntu@geoffair.info>
Date: Fri, 23 Mar 2018 20:08:54 +0100
Subject: Issue #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);
|