Hi,
Wanted to know, is there a way to decode strings escaped with Unicode? Thanks
Is there any way you could provide an example input?
http\\u00253A\\u00252F\\u00252Fexample.com
Something like this?
BLOCK:ConstantString
value = "http\\u00253A\\u00252F\\u00252Fexample.com"
=> VAR @str
ENDBLOCK
string unescaped = System.Text.RegularExpressions.Regex.Replace(
str,
@"\\[Uu]([0-9A-Fa-f]{4})",
m => char.ToString(
(char)ushort.Parse(m.Groups[1].Value, System.Globalization.NumberStyles.AllowHexSpecifier)));
BLOCK:UrlDecode
input = @unescaped
=> VAR @decoded
ENDBLOCK
If you really have two \
characters in the starting string then maybe replace \\
with \
before unescaping.
Wish we could trade brains
Thanks a lot
Well I just googled and copied a piece of code from stackoverflow nothing really hard
This lmao, Stackoverflow is all you need
1 Like