diff options
author | corvid <corvid@lavabit.com> | 2009-07-26 03:12:36 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-07-26 03:12:36 +0000 |
commit | 1b172c8da3e315676e6b5e41ca26b4b34213f51b (patch) | |
tree | ae0f47a3921f952503efc168aa401c6f032b27fb /src/html.cc | |
parent | c5434804b92620ed31190b396fe1f631d6014ae5 (diff) |
allow collapse of   (space numeric char. ref.) in word
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/html.cc b/src/html.cc index abb3c416..d08884ba 100644 --- a/src/html.cc +++ b/src/html.cc @@ -849,7 +849,7 @@ static const Ent_t Entities[NumEnt] = { {"loz",022712}, {"lrm",020016}, {"lsaquo",020071},{"lsquo",020030}, {"lt",60}, {"macr",0257}, {"mdash",020024},{"micro",0265}, {"middot",0267},{"minus",021022},{"mu",01674}, {"nabla",021007}, - {"nbsp",32}, {"ndash",020023},{"ne",021140}, {"ni",021013}, + {"nbsp",0240}, {"ndash",020023},{"ne",021140}, {"ni",021013}, {"not",0254}, {"notin",021011},{"nsub",021204}, {"ntilde",0361}, {"nu",01675}, {"oacute",0363}, {"ocirc",0364}, {"oelig",0523}, {"ograve",0362},{"oline",020076},{"omega",01711}, {"omicron",01677}, @@ -1173,13 +1173,14 @@ static void Html_process_word(DilloHtml *html, const char *word, int size) } else { /* Collapse white-space entities inside the word (except ) */ Pword = a_Html_parse_entities(html, word, size); - /* Collapse adjacent "\t\f\n\r" characters into a single space */ + /* Collapse adjacent " \t\f\n\r" characters into a single space */ for (i = j = 0; (Pword[i] = Pword[j]); ++i, ++j) { - if (strchr("\t\f\n\r", Pword[i])) { + if (strchr(" \t\f\n\r", Pword[i])) { if (i == 0 || (i > 0 && Pword[i-1] != ' ')) Pword[i] = ' '; else - for (--i; strchr("\t\f\n\r", Pword[j+1]); ++j) ; + for (--i; Pword[j+1] && strchr(" \t\f\n\r", Pword[j+1]); ++j) + ; } } HT2TB(html)->addText(Pword, html->styleEngine->wordStyle ()); |