summaryrefslogtreecommitdiff
path: root/src/scanners.re
diff options
context:
space:
mode:
authorYuki Izumi <kivikakk@github.com>2017-06-21 14:51:30 +1000
committerYuki Izumi <yuki@kivikakk.ee>2017-06-21 16:34:24 +1000
commitc161a9a14220de62ea3d2d082d17d1831a6e5d7a (patch)
tree4edc5decb78e4d9ab10e7c48b1c324eb4df4a49d /src/scanners.re
parentf3026b816d7a33e62824bd559692422206196c6d (diff)
Don't scan past an EOL
Diffstat (limited to 'src/scanners.re')
-rw-r--r--src/scanners.re10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scanners.re b/src/scanners.re
index b313736..a7b9696 100644
--- a/src/scanners.re
+++ b/src/scanners.re
@@ -156,7 +156,7 @@ bufsize_t _scan_html_block_end_1(const unsigned char *p)
const unsigned char *marker = NULL;
const unsigned char *start = p;
/*!re2c
- .* [<] [/] ('script'|'pre'|'style') [>] { return (bufsize_t)(p - start); }
+ [^\x00]* [<] [/] ('script'|'pre'|'style') [>] { return (bufsize_t)(p - start); }
* { return 0; }
*/
}
@@ -167,7 +167,7 @@ bufsize_t _scan_html_block_end_2(const unsigned char *p)
const unsigned char *marker = NULL;
const unsigned char *start = p;
/*!re2c
- .* '-->' { return (bufsize_t)(p - start); }
+ [^\x00]* '-->' { return (bufsize_t)(p - start); }
* { return 0; }
*/
}
@@ -178,7 +178,7 @@ bufsize_t _scan_html_block_end_3(const unsigned char *p)
const unsigned char *marker = NULL;
const unsigned char *start = p;
/*!re2c
- .* '?>' { return (bufsize_t)(p - start); }
+ [^\x00]* '?>' { return (bufsize_t)(p - start); }
* { return 0; }
*/
}
@@ -189,7 +189,7 @@ bufsize_t _scan_html_block_end_4(const unsigned char *p)
const unsigned char *marker = NULL;
const unsigned char *start = p;
/*!re2c
- .* '>' { return (bufsize_t)(p - start); }
+ [^\x00]* '>' { return (bufsize_t)(p - start); }
* { return 0; }
*/
}
@@ -200,7 +200,7 @@ bufsize_t _scan_html_block_end_5(const unsigned char *p)
const unsigned char *marker = NULL;
const unsigned char *start = p;
/*!re2c
- .* ']]>' { return (bufsize_t)(p - start); }
+ [^\x00]* ']]>' { return (bufsize_t)(p - start); }
* { return 0; }
*/
}