diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-09-23 15:43:37 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-09-23 15:43:37 -0300 |
commit | 20a1c765db5ecb8c2020ce6dea1de1fda706ee1f (patch) | |
tree | 48f0889383ed6dd9eea02a2472a7373186ca8f03 | |
parent | eea52d44c797663aad85686ecb6e0b471a989e58 (diff) | |
parent | ca11b2fa4b87642d6e1bbd000bfa74e4922b390b (diff) |
Merge pull request #2512 from bojidar-bg/patch-2
Flip < and > in String::xml_escape.
-rw-r--r-- | core/ustring.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index ff7c8984fa..e5419effcb 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3119,8 +3119,8 @@ String String::xml_escape(bool p_escape_quotes) const { String str=*this; str=str.replace("&","&"); - str=str.replace("<",">"); - str=str.replace(">","<"); + str=str.replace("<","<"); + str=str.replace(">",">"); if (p_escape_quotes) { str=str.replace("'","'"); str=str.replace("\"","""); @@ -3172,12 +3172,12 @@ static _FORCE_INLINE_ int _xml_unescape(const CharType *p_src,int p_src_len,Char } else if (p_src_len>=4 && p_src[1]=='g' && p_src[2]=='t' && p_src[3]==';') { if (p_dst) - *p_dst='<'; + *p_dst='>'; eat=4; } else if (p_src_len>=4 && p_src[1]=='l' && p_src[2]=='t' && p_src[3]==';') { if (p_dst) - *p_dst='>'; + *p_dst='<'; eat=4; } else if (p_src_len>=5 && p_src[1]=='a' && p_src[2]=='m' && p_src[3]=='p' && p_src[4]==';') { |