Removed the warning " [StringUtils] WARNING: Invalid HTML entity in

'Berny & STKRudy85' (we only support &#...; type HTML entities)"; #364.

The reason for this warning message is that irrXML already decodes "&"
(in attribute values) - so even though the '&' is encoded correctly in
the xml as '&', STK only receives a '&' from irrlicht, which then triggers the
warning message. On the other hand, irrXML does not decode &#...; hex
values. 

So short of changing our encoding of "&" I don't see another choice
except just removing this warning.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9510 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2011-08-15 23:29:14 +00:00
parent d26bc30c9c
commit 5eff0a1773
+7 -1
View File
@@ -511,7 +511,13 @@ namespace StringUtils
{
output += L"&";
output += wchar_t(input[n]);
fprintf(stderr, "[StringUtils] WARNING: Invalid HTML entity in '%s' (we only support &#...; type HTML entities)\n", input.c_str());
// This is actually an error, but we can't print a
// warning here: irrxml replaces & in (e.g.)
// attribute values with '&' - so we can have a single
// '&' that is correct. On the other hand we have to
// convert esp. &# hex codes, since we use this to
// encode special characters, but irrlicht does not
// decode those.
state = NORMAL;
}
else