Fix wxHTML parse bug in non-unicode, ? characters are not displayed.

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.
This commit is contained in:
Gavin Kinsey 2016-10-11 09:46:38 +01:00 committed by Vadim Zeitlin
parent 361d7b4938
commit d24ffcf749

View File

@ -338,10 +338,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