Skip to content

Commit 7e69ceb

Browse files
committed
Issue #281 - only warn BAD_CDATA_CONTENT if inserting an escape.
1 parent 4e3f853 commit 7e69ceb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lexer.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2132,11 +2132,13 @@ static Node *GetCDATA( TidyDocImpl* doc, Node *container )
21322132
/* if the end tag is not already escaped using backslash */
21332133
SetLexerLocus( doc, lexer );
21342134
lexer->columns -= 3;
2135-
TY_(ReportError)(doc, NULL, NULL, BAD_CDATA_CONTENT);
21362135

21372136
/* if javascript insert backslash before / */
21382137
if (TY_(IsJavaScript)(container))
21392138
{
2139+
/* Issue #281 - only warn if adding the escape! */
2140+
TY_(ReportError)(doc, NULL, NULL, BAD_CDATA_CONTENT);
2141+
21402142
for (i = lexer->lexsize; i > start-1; --i)
21412143
lexer->lexbuf[i] = lexer->lexbuf[i-1];
21422144

0 commit comments

Comments
 (0)