From a9f88a05d67840e43b775b953bb9483a28c5334a Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sun, 24 May 2015 19:00:39 +0200
Subject: [PATCH] Don't render consecutive blanks inside links.
---
apps/webbrowser/htmlparser.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/webbrowser/htmlparser.c b/apps/webbrowser/htmlparser.c
index f955b2f3d..bb59477b1 100644
--- a/apps/webbrowser/htmlparser.c
+++ b/apps/webbrowser/htmlparser.c
@@ -305,7 +305,9 @@ do_word(void)
{
if(s.wordlen > 0) {
if(s.majorstate == MAJORSTATE_LINK) {
- add_char(ISO_space);
+ if(s.word[s.wordlen - 1] != ISO_space) {
+ add_char(ISO_space);
+ }
} else if(s.majorstate == MAJORSTATE_DISCARD) {
s.wordlen = 0;
} else {