diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-03 21:35:00 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-03 21:35:00 -0800 |
commit | 918867accab909c6efb2f762773b9f72c8f1014b (patch) | |
tree | 8627a19ecd9d75bc8aa37b00f50909e666e02e6e /js/lib | |
parent | ab8b56178e80362c1a1250496f5cd14ab53f03f0 (diff) |
Fixed CDATA regex in js.
Closes #267.
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/inlines.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/lib/inlines.js b/js/lib/inlines.js index 2df3630..4180f30 100644 --- a/js/lib/inlines.js +++ b/js/lib/inlines.js @@ -36,7 +36,7 @@ var CLOSETAG = "</" + TAGNAME + "\\s*[>]"; var HTMLCOMMENT = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->"; var PROCESSINGINSTRUCTION = "[<][?].*?[?][>]"; var DECLARATION = "<![A-Z]+" + "\\s+[^>]*>"; -var CDATA = "<!\\[CDATA\\[([^\\]]+|\\][^\\]]|\\]\\][^>])*\\]\\]>"; +var CDATA = "<!\\[CDATA\\[[\\s\\S]*?\]\\]>"; var HTMLTAG = "(?:" + OPENTAG + "|" + CLOSETAG + "|" + HTMLCOMMENT + "|" + PROCESSINGINSTRUCTION + "|" + DECLARATION + "|" + CDATA + ")"; var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});"; |