From f62af612c6e6217d7b2a1b064cdf10383524302b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 14 May 2020 17:24:27 +0200 Subject: Use text_stripped for javascript as well --- src/HtmlParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3