Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2025-08

URIParser.Unescape

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thomas Kurz

Hello,

I have seen that the `URIParser.Unescape` function handles only percent encoding. But it is called within the `ParseURI` function to decode the parameters:

if Decode then
      Result.Params:=Unescape(Result.Params);

So I wonder whether it'd have to decode plus signs to spaces, as well? At least I stumbled upon this problem after having received an URL parameter in the style `param+name=param+value`.

Thanks,
Thomas

Reply by email

Thomas Kurz
to Thomas Kurz

Edit:

On the other hand, `HttpProtocol.HTTPEncode` does never encode spaces to `%20`, regardless of the `aSpacesAsPlus` parameter. (If set to `false`, spaces keep being spaces.)

Earlier message 18 lines
----- Original Message ----- From: Thomas Kurz via fpc-pascal To: FPC-Pascal users discussions Sent: Tuesday, August 26, 2025, 11:23:57 Subject: [fpc-pascal] URIParser.Unescape Hello, I have seen that the `URIParser.Unescape` function handles only percent encoding. But it is called within the `ParseURI` function to decode the parameters: if Decode then Result.Params:=Unescape(Result.Params); So I wonder whether it'd have to decode plus signs to spaces, as well? At least I stumbled upon this problem after having received an URL parameter in the style `param+name=param+value`. Thanks, Thomas

Reply by email