summaryrefslogtreecommitdiffstats
path: root/scene/resources/resource_format_text.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-08 11:53:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-08 11:53:28 +0100
commit48b726deba12826a23fee958b942d93f34160f6c (patch)
tree9787b7656c2b805df58ebdb5f4db2ea8052aa720 /scene/resources/resource_format_text.cpp
parentff79ec75de67ed757b0de1252f48f3f05b8f60d5 (diff)
parent0a32c160ac89edbb7f48c34e21768c5cc85704af (diff)
downloadredot-engine-48b726deba12826a23fee958b942d93f34160f6c.tar.gz
Merge pull request #86417 from LimestaX/tscn-escape-char-fix
Ensure special characters are escaped in TSCN connections and editable hint
Diffstat (limited to 'scene/resources/resource_format_text.cpp')
-rw-r--r--scene/resources/resource_format_text.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 29cd9f648d..a97ff5054d 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -2289,10 +2289,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
}
String connstr = "[connection";
- connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
- connstr += " from=\"" + String(state->get_connection_source(i).simplified()) + "\"";
- connstr += " to=\"" + String(state->get_connection_target(i).simplified()) + "\"";
- connstr += " method=\"" + String(state->get_connection_method(i)) + "\"";
+ connstr += " signal=\"" + String(state->get_connection_signal(i)).c_escape() + "\"";
+ connstr += " from=\"" + String(state->get_connection_source(i).simplified()).c_escape() + "\"";
+ connstr += " to=\"" + String(state->get_connection_target(i).simplified()).c_escape() + "\"";
+ connstr += " method=\"" + String(state->get_connection_method(i)).c_escape() + "\"";
int flags = state->get_connection_flags(i);
if (flags != Object::CONNECT_PERSIST) {
connstr += " flags=" + itos(flags);
@@ -2319,7 +2319,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
if (i == 0) {
f->store_line("");
}
- f->store_line("[editable path=\"" + editable_instances[i].operator String() + "\"]");
+ f->store_line("[editable path=\"" + editable_instances[i].operator String().c_escape() + "\"]");
}
}