diff --git a/releasenotes/notes/group-subst-16dce373ccd24118.yaml b/releasenotes/notes/group-subst-16dce373ccd24118.yaml new file mode 100644 index 0000000..2857dfd --- /dev/null +++ b/releasenotes/notes/group-subst-16dce373ccd24118.yaml @@ -0,0 +1,3 @@ +fixes: + - Literal '$' characters are now handled correctly when they appear in + substitution strings for RedirectMatch directives. diff --git a/whereto/rules.py b/whereto/rules.py index faab4c1..6acdac0 100644 --- a/whereto/rules.py +++ b/whereto/rules.py @@ -70,14 +70,19 @@ class Redirect(Rule): class RedirectMatch(Rule): "A RedirectMatch rule with a regular expression." + _group_subst = re.compile(r'(?