various minor changes:

+ whitespace improvement
+ code cleanup
This commit is contained in:
wmayer
2017-11-21 17:51:22 +01:00
parent 952a4a781f
commit 4d63e9a4c4
20 changed files with 86 additions and 126 deletions

View File

@@ -161,7 +161,7 @@ std::string Property::encodeAttribute(const std::string& str)
for (std::string::const_iterator it = str.begin(); it != str.end(); ++it) {
if (*it == '<')
tmp += "&lt;";
else if (*it == '"')
else if (*it == '\"')
tmp += "&quot;";
else if (*it == '\'')
tmp += "&apos;";
@@ -170,9 +170,11 @@ std::string Property::encodeAttribute(const std::string& str)
else if (*it == '>')
tmp += "&gt;";
else if (*it == '\r')
tmp += "&#xD;";
tmp += "&#13;";
else if (*it == '\n')
tmp += "&#xA;";
tmp += "&#10;";
else if (*it == '\t')
tmp += "&#9;";
else
tmp += *it;
}