Does the String.percent_encode() do the same as WWW.EscapeURL() in C#?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lukas
:warning: Old Version Published before Godot 3 was released.

In C#, Unity3S WWW.EscapeURL() encodes string into an URL-friendly format.
Does the String.percent_encode() do the same in Godot? Or do I need to escape other characters?

:bust_in_silhouette: Reply From: Zylann

percent_encode replaces characters that don’t fit URLs by their hexadecimal code preceded by %. It does that for all characters that are not in the following ranges:

AZ, az, 09, -, _, ~, and ..

So yes, according to the doc, it was meant to encore URL strings, especially for parameters or forms.