From d541405a2a3ef4cd1c1c25496f425ff5635f6f8a Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Wed, 16 Sep 2015 13:17:50 +0200 Subject: [PATCH] Eventually complete a 2007 fix --- include/tidyenum.h | 1 + src/config.c | 1 + src/lexer.c | 75 ++++++++++++++++++++++++++++++++++++ src/localize.c | 4 ++ test/input/cfg_1642186-1.txt | 7 ++++ test/input/in_1642186-1.html | 14 +++++++ version.txt | 4 +- 7 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 test/input/cfg_1642186-1.txt create mode 100644 test/input/in_1642186-1.html diff --git a/include/tidyenum.h b/include/tidyenum.h index 3b2e7c2..4ed82b0 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -205,6 +205,7 @@ typedef enum TidyMergeSpans, /**< Merge multiple SPANs */ TidyAnchorAsName, /**< Define anchors as name attributes */ TidyPPrintTabs, /**< Indent using tabs istead of spaces */ + TidySkipQuotes, /**< Skip quotes and comments in script CDATA */ N_TIDY_OPTIONS /**< Must be last */ } TidyOptionId; diff --git a/src/config.c b/src/config.c index 9ac6b9e..5ca18f8 100644 --- a/src/config.c +++ b/src/config.c @@ -321,6 +321,7 @@ static const TidyOptionImpl option_defs[] = { TidyMergeSpans, MU, "merge-spans", IN, TidyAutoState, ParseAutoBool, autoBoolPicks }, { TidyAnchorAsName, MU, "anchor-as-name", BL, yes, ParseBool, boolPicks }, { TidyPPrintTabs, PP, "indent-with-tabs", BL, no, ParseTabs, boolPicks }, /* 20150515 - Issue #108 */ + { TidySkipQuotes, MU, "skip-quotes", BL, no, ParseBool, boolPicks }, /* 1642186 - Issue #65 */ { N_TIDY_OPTIONS, XX, NULL, XY, 0, NULL, NULL } }; diff --git a/src/lexer.c b/src/lexer.c index b571d43..84031e5 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1947,6 +1947,73 @@ static Bool ExpectsContent(Node *node) return yes; } +/*\ + * Issue #65 - also see http://tidy.sf.net/issue/1642186 + * Parser too gready over + + + + diff --git a/version.txt b/version.txt index 31b6355..5a4e3fd 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -5.1.9 -2015.09.10 +5.1.10 +2015.09.16