aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-05-14 17:24:27 +0200
committerdec05eba <dec05eba@protonmail.com>2020-05-14 17:24:27 +0200
commitf62af612c6e6217d7b2a1b064cdf10383524302b (patch)
tree09e6a49e4b819e6e510360898bfdff17251825e3 /src
parentcd786ced0f04d9383cde1c451f0bab18135072bd (diff)
Use text_stripped for javascript as well
Diffstat (limited to 'src')
-rw-r--r--src/HtmlParser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HtmlParser.c b/src/HtmlParser.c
index f300b62..965368e 100644
--- a/src/HtmlParser.c
+++ b/src/HtmlParser.c
@@ -253,7 +253,7 @@ static void html_parser_goto_script_end_tag(HtmlParser *self) {
html_parser_goto_end_of_js_string(self, c);
} else if(c == '<' && self->offset + 7 < self->source_len && memcmp(self->source + self->offset + 1, "/script", 7) == 0) {
self->text.size = (self->source + self->offset) - self->text.data;
- strip(self->text.data, self->text.size, &self->text.data, &self->text.size, is_whitespace);
+ strip(self->text.data, self->text.size, &self->text_stripped.data, &self->text_stripped.size, is_whitespace);
self->offset += 7;
for(;;) {
c = html_parser_peek_char(self);
@@ -269,7 +269,7 @@ static void html_parser_goto_script_end_tag(HtmlParser *self) {
break;
} else if(c == '\0') {
self->text.size = (self->source + self->offset) - self->text.data;
- strip(self->text.data, self->text.size, &self->text.data, &self->text.size, is_whitespace);
+ strip(self->text.data, self->text.size, &self->text_stripped.data, &self->text_stripped.size, is_whitespace);
break;
} else {
html_parser_advance_char(self);