Reputation: 2901
Some of my wide strings contains characters escaped with &#
For example:
The wide string source looks like: '   '
The converted result must be ' '
(3 blank spaces).
Function should look like
function UriUnescape(const aSrc: WideString): WideString;
begin
//Your code goes here
end;
Note: 1) I am using Delphi 7.
2) This wide string is part of a SOAP response not HTML.
3) In general this method should accept alphanumeric characters as part of the wide string: example input :='be @' result := 'be @'
Upvotes: 2
Views: 2303
Reputation: 37211
Your C# link is about URL unescaping but your source string looks more like HTML encoded.
In that case, see HtmlDecode
function in HttpApp
unit.
If you want URL decoding you could try HttpDecode
or Indy's TIdURL.URLDecode
.
Upvotes: 9