+ handle single quote when writing XML
This commit is contained in:
parent
d371cff4f2
commit
d71d8943cb
|
@ -289,12 +289,16 @@ std::string DynamicProperty::encodeAttribute(const std::string& str) const
|
|||
tmp += "<";
|
||||
else if (*it == '"')
|
||||
tmp += """;
|
||||
else if (*it == '\'')
|
||||
tmp += "'";
|
||||
else if (*it == '&')
|
||||
tmp += "&";
|
||||
else if (*it == '>')
|
||||
tmp += ">";
|
||||
else if (*it == '\r')
|
||||
tmp += "
";
|
||||
else if (*it == '\n')
|
||||
tmp += " ";
|
||||
tmp += "
";
|
||||
else
|
||||
tmp += *it;
|
||||
}
|
||||
|
|
|
@ -122,6 +122,8 @@ std::string Property::encodeAttribute(const std::string& str)
|
|||
tmp += "<";
|
||||
else if (*it == '"')
|
||||
tmp += """;
|
||||
else if (*it == '\'')
|
||||
tmp += "'";
|
||||
else if (*it == '&')
|
||||
tmp += "&";
|
||||
else if (*it == '>')
|
||||
|
|
Loading…
Reference in New Issue
Block a user