aboutsummaryrefslogtreecommitdiff
path: root/core/io/resource_format_xml.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2014-12-07 11:33:57 -0300
committerJuan Linietsky2014-12-07 11:33:57 -0300
commit10b371516bfd88f354acde9a2b37cf854eb92780 (patch)
treea064a5c4fa57b42184b928fc2dc825d88a1206d8 /core/io/resource_format_xml.cpp
parentda91ca71645cccf38dc593ef790d09d4610c2aef (diff)
downloadgodot-10b371516bfd88f354acde9a2b37cf854eb92780.tar.gz
godot-10b371516bfd88f354acde9a2b37cf854eb92780.tar.zst
godot-10b371516bfd88f354acde9a2b37cf854eb92780.zip
Diffstat (limited to 'core/io/resource_format_xml.cpp')
-rw-r--r--core/io/resource_format_xml.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index 2a79e6647..75384d4ab 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -193,6 +193,7 @@ Error ResourceInteractiveLoaderXML::close_tag(const String& p_name) {
void ResourceInteractiveLoaderXML::unquote(String& p_str) {
+
p_str=p_str.strip_edges().replace("\"","").xml_unescape();
/*p_str=p_str.strip_edges();
@@ -1851,7 +1852,10 @@ void ResourceFormatSaverXMLInstance::escape(String& p_str) {
for (int i=1;i<32;i++) {
char chr[2]={i,0};
- p_str=p_str.replace(chr,"&#"+String::num(i)+";");
+ const char hexn[16]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
+ const char hex[8]={'&','#','0','0',hexn[i>>4],hexn[i&0xf],';',0};
+
+ p_str=p_str.replace(chr,hex);
}