Flip < and > in String::xml_escape. Close #2511

Before > referred to &lt; and < to &gt;, which is incorrect...
This commit is contained in:
Bojidar Marinov 2015-09-23 21:33:31 +03:00
parent eea52d44c7
commit a7f0846a6b

View file

@ -3119,8 +3119,8 @@ String String::xml_escape(bool p_escape_quotes) const {
String str=*this;
str=str.replace("&","&amp;");
str=str.replace("<","&gt;");
str=str.replace(">","&lt;");
str=str.replace("<","&lt;");
str=str.replace(">","&gt;");
if (p_escape_quotes) {
str=str.replace("'","&apos;");
str=str.replace("\"","&quot;");