diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-11-14 10:52:55 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-12-03 12:25:51 +0100 |
commit | 5ba0b431a80707230c0e7e14c2b4eb520efb3e2d (patch) | |
tree | f6471271d66a686ba22ab0293757b67f97e14cfb /source | |
parent | 95b7dff5c86a8a9c09c8771a15ea7963044597ef (diff) | |
download | mupdf-5ba0b431a80707230c0e7e14c2b4eb520efb3e2d.tar.xz |
html: Fix CSS parsing mixed-case selectors and comments.
Diffstat (limited to 'source')
-rw-r--r-- | source/html/css-parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/html/css-parse.c b/source/html/css-parse.c index 93c5ff58..63abee42 100644 --- a/source/html/css-parse.c +++ b/source/html/css-parse.c @@ -35,13 +35,13 @@ static int iswhite(int c) static int isnmstart(int c) { - return c == '\\' || c == '_' || (c >= 'a' && c <= 'z') || + return c == '\\' || c == '_' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= 128 && c <= 255); } static int isnmchar(int c) { - return c == '\\' || c == '_' || (c >= 'a' && c <= 'z') || + return c == '\\' || c == '_' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || (c >= 128 && c <= 255); } @@ -196,6 +196,7 @@ static int css_lex(struct lexbuf *buf) while (buf->c) { +restart: while (iswhite(buf->c)) css_lex_next(buf); @@ -213,7 +214,7 @@ static int css_lex(struct lexbuf *buf) while (buf->c == '*') css_lex_next(buf); if (css_lex_accept(buf, '/')) - continue; + goto restart; } css_lex_next(buf); } |