Fix build on vs2008

develop
kaetemi 4 years ago
parent 1aba4c13cb
commit 85ec6e618e
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -141,14 +141,14 @@ namespace NLGUI
// *************************************************************************** // ***************************************************************************
std::string CHtmlElement::htmlEscape(std::string val, bool isAttribute) const std::string CHtmlElement::htmlEscape(std::string val, bool isAttribute) const
{ {
static const std::vector<std::string> searchReplace = { static const std::string searchReplace[] = {
"&", "&amp;", "&", "&amp;",
"<", "&lt;", "<", "&lt;",
">", "&gt;", ">", "&gt;",
"\xA0", "&nbsp;", "\xA0", "&nbsp;",
}; };
for(uint i = 0; i < searchReplace.size(); i+=2) for(uint i = 0; i < (sizeof(searchReplace) / sizeof(searchReplace[0])); i+=2)
val = strFindReplaceAll(val, searchReplace[i], searchReplace[i+1]); val = strFindReplaceAll(val, searchReplace[i], searchReplace[i+1]);
if (isAttribute) if (isAttribute)

Loading…
Cancel
Save