… spotted in a wild page and implemented

This commit is contained in:
Lionel Dricot 2022-02-27 22:54:28 +01:00
parent f73577ae08
commit 3faca54050
1 changed files with 2 additions and 1 deletions

View File

@ -736,7 +736,8 @@ class HtmlRenderer(AbstractRenderer):
toreturn = string.replace("\n", " ").replace("\t"," ").strip()
while " " in toreturn:
toreturn = toreturn.replace(" "," ")
toreturn = toreturn.replace("&nbsp","\xa0")
toreturn = toreturn.replace(" ","\xa0").replace("&nbsp","\xa0")
toreturn = toreturn.replace("…","\u2026").replace("&mldr","\u2026")
if endspace and not toreturn.endswith(" ") and not toreturn.endswith("\xa0"):
toreturn += " "
if startspace and not toreturn.startswith(" ") and not toreturn.startswith("\xa0"):