Skip to content

Commit

Permalink
+ handle single quote when writing XML
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 30, 2015
1 parent d371cff commit d71d894
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/App/DynamicProperty.cpp
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions src/App/Property.cpp
Expand Up @@ -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 == '>')
Expand Down

0 comments on commit d71d894

Please sign in to comment.