Ensure special characters are escaped in tscn connections and editable hint
This commit is contained in:
parent
c8c483cf57
commit
0a32c160ac
1 changed files with 5 additions and 5 deletions
|
@ -2289,10 +2289,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
|
||||||
}
|
}
|
||||||
|
|
||||||
String connstr = "[connection";
|
String connstr = "[connection";
|
||||||
connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
|
connstr += " signal=\"" + String(state->get_connection_signal(i)).c_escape() + "\"";
|
||||||
connstr += " from=\"" + String(state->get_connection_source(i).simplified()) + "\"";
|
connstr += " from=\"" + String(state->get_connection_source(i).simplified()).c_escape() + "\"";
|
||||||
connstr += " to=\"" + String(state->get_connection_target(i).simplified()) + "\"";
|
connstr += " to=\"" + String(state->get_connection_target(i).simplified()).c_escape() + "\"";
|
||||||
connstr += " method=\"" + String(state->get_connection_method(i)) + "\"";
|
connstr += " method=\"" + String(state->get_connection_method(i)).c_escape() + "\"";
|
||||||
int flags = state->get_connection_flags(i);
|
int flags = state->get_connection_flags(i);
|
||||||
if (flags != Object::CONNECT_PERSIST) {
|
if (flags != Object::CONNECT_PERSIST) {
|
||||||
connstr += " flags=" + itos(flags);
|
connstr += " flags=" + itos(flags);
|
||||||
|
@ -2319,7 +2319,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
f->store_line("");
|
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() + "\"]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue