Skip to content

Commit

Permalink
Fix wxHTML parse bug in non-unicode, ? characters are not displayed.
Browse files Browse the repository at this point in the history
GetEntitiesParser()->GetCharForCode(NBSP_UNICODE_VALUE) in the non-unicode
build returns the value '?' as it doesn't find a match for that value.  The
parser then proceeds to replace all '?' characters in the HTML document with
NBSP.

Change the type of the #define to be unsigned int rather than wxChar for
non-unicode to fix this.

Closes #17692.

(cherry picked from commit d24ffcf)
  • Loading branch information
gkinseyhpw authored and vadz committed Sep 5, 2017
1 parent b4ed69a commit ddf2feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/html/winpars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,11 @@ wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
return GetFS()->OpenFile(myurl, flags);
}

#define NBSP_UNICODE_VALUE (wxChar(160))
#if !wxUSE_UNICODE
#define NBSP_UNICODE_VALUE (160U)
#define CUR_NBSP_VALUE m_nbsp
#else
#define NBSP_UNICODE_VALUE (wxChar(160))
#define CUR_NBSP_VALUE NBSP_UNICODE_VALUE
#endif

Expand Down

0 comments on commit ddf2feb

Please sign in to comment.