diff options
| author | Ulysses Zhan <UlyssesZhan@gmail.com> | 2025-05-17 04:33:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-17 13:33:36 +0200 |
| commit | dfb8bf17cffee5625f0afcd04b4b4ff43066793a (patch) | |
| tree | 83e1ac409d091952415c5af3d770e88404b719d8 /pkgs/development/python-modules/rangehttpserver | |
| parent | 49b6072f109c4e147f9255ae7fb89a0997f2341e (diff) | |
update-source-version: escape special characters when replacing url
URLs can contain characters that sed would consider special in the context of the regex pattern.
Let’s switch the URL replacement `sed` command to use POSIX Basic Regular Expression syntax to reduce the number of characters that need to be escaped:
https://www.gnu.org/software/sed/manual/html_node/BRE-syntax.html
Then, let’s escape all BRE special characters, plus the separator character `|` of the `s` command in the old URL pattern.
Similarly, the replacement part of the `s` command (new URL) can also contain special characters (e.g. the `&` character would be replaced with the whole matched expression), so we need to escape it as well:
https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html
Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions
