소스 검색

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

Before > referred to &lt; and < to &gt;, which is incorrect...
Bojidar Marinov 10 년 전
부모
커밋
a7f0846a6b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/ustring.cpp

+ 2 - 2
core/ustring.cpp

@@ -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;");