Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
This commit is contained in:
parent
a3e3bf8227
commit
e829b7aee4
15 changed files with 81 additions and 142 deletions
|
|
@ -289,7 +289,7 @@ void Collada::_parse_image(XMLParser &parser) {
|
|||
String path = parser.get_attribute_value("source").strip_edges();
|
||||
if (path.find("://") == -1 && path.is_rel_path()) {
|
||||
// path is relative to file being loaded, so convert to a resource path
|
||||
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.percent_decode()));
|
||||
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.uri_decode()));
|
||||
}
|
||||
} else {
|
||||
while (parser.read() == OK) {
|
||||
|
|
@ -298,7 +298,7 @@ void Collada::_parse_image(XMLParser &parser) {
|
|||
|
||||
if (name == "init_from") {
|
||||
parser.read();
|
||||
String path = parser.get_node_data().strip_edges().percent_decode();
|
||||
String path = parser.get_node_data().strip_edges().uri_decode();
|
||||
|
||||
if (path.find("://") == -1 && path.is_rel_path()) {
|
||||
// path is relative to file being loaded, so convert to a resource path
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ void EditorAssetLibrary::_search(int p_page) {
|
|||
}
|
||||
|
||||
if (filter->get_text() != String()) {
|
||||
args += "&filter=" + filter->get_text().http_escape();
|
||||
args += "&filter=" + filter->get_text().uri_encode();
|
||||
}
|
||||
|
||||
if (p_page > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue