From 57aa4def625f469142e604230177937127cc04a9 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 30 Mar 2023 23:02:57 +0300 Subject: [PATCH] net.html: do not inject tags for text that contains only newlines and spaces --- vlib/net/html/parser.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/net/html/parser.v b/vlib/net/html/parser.v index 6ebc30b2fd..73997b6b9e 100644 --- a/vlib/net/html/parser.v +++ b/vlib/net/html/parser.v @@ -71,7 +71,7 @@ fn (mut parser Parser) verify_end_comment(remove bool) bool { fn blank_string(data string) bool { mut count := 0 for chr in data { - if chr == 9 || chr == 32 { + if chr == 10 || chr == 9 || chr == 32 { count++ } }