spiegel-keyman/common/windows/delphi
Marc Durdin 6eefb3a771 fix(developer): EncodeURL was not handling spaces
Fixes #7810.

This addresses a regression introduced in #7631, where URL parameters
with spaces would be encoded into `+` instead of `%20`. Looking a bit
deeper at the Delphi `TNetEncoding.URL.Encode` function I realised that
it was entirely inadequate. Some guy named Marc Durdin wrote a blog a
good few years ago about the problem, and that's what I ended up using.

This encoding issue caused filenames with spaces (by default, project
paths in Developer have spaces) to give a 404 when editing a touch
layout, which meant that the touch keyboards could not be saved.

Also fixes KEYMAN-DEVELOPER-74, where the + encoding caused multiple
entries to appear in the filename cache.

Amusing to Google this problem, find solid answer on SO, which pointed
to my very own blog. Embarrassing that my own code didn't already
include my own fix.

A secondary issue is also fixed here, where request parameters were
double-decoded for formencoded POST requests. The fix for broken URL
encodings was only required for GET requests.

This also showed up in KEYMAN-DEVELOPER-74, with double-encoded paths
being registered as source files.
2022-11-26 07:09:53 +07:00
..
charmap fix(developer): prevent exception in charmap when unable to focus 2022-11-07 08:49:11 +11:00
chromium fix(developer): cast to prevent ERangeError for failed http reqs in CEF 2022-11-21 09:01:40 +11:00
components fix(developer): add no-ops for symbol builds for components 2022-07-08 05:04:10 +10:00
ext chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-general-files 2022-06-25 05:39:26 +10:00
general fix(developer): EncodeURL was not handling spaces 2022-11-26 07:09:53 +07:00
keyboards chore(windows): move general keyboard units to common 2022-06-23 06:33:16 +10:00
packages chore(windows): move general package units to common 2022-06-23 06:36:23 +10:00
setup fix(developer): show more useful error if out of space during Setup 2022-09-12 12:02:09 +10:00
standards chore(windows): move global/delphi/standards to common 2022-06-13 06:15:47 +10:00
tlb chore(windows): move global/delphi/tlb to common 2022-06-13 06:29:23 +10:00
tools chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-general-files 2022-06-25 05:39:26 +10:00
ui fix(developer): generate a default icon for basic keyboard projects 2022-11-01 15:14:13 +11:00
vcl chore(windows): move Keyman.System.RegExGroupHelperRSP19902 unit to common 2022-06-22 14:02:03 +10:00
visualkeyboard chore(windows): move ExtShiftState to common 2022-06-21 09:38:52 +10:00
web fix(developer): EncodeURL was not handling spaces 2022-11-26 07:09:53 +07:00
Defines.mak chore(windows): move FixedTrackbar and add common_components to makefiles 2022-06-21 09:38:54 +10:00
Header.mak chore(windows): move dcpcrypt to common/windows 2022-06-02 10:38:29 +10:00
Makefile chore(windows): move KeymanVersion.pas to common and update refs 2022-06-21 09:39:04 +10:00
Target.mak chore(windows): move dcpcrypt to common/windows 2022-06-02 10:38:29 +10:00