summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdh_installinfo2
1 files changed, 2 insertions, 0 deletions
diff --git a/dh_installinfo b/dh_installinfo
index 814c831b..78dddc7b 100755
--- a/dh_installinfo
+++ b/dh_installinfo
@@ -105,6 +105,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if ($section ne '') {
$section=~s:/:\\/:g; # allow / in section.
+ $section=~s/\&/\\&/g; # escape sed specials
+ $section=~s/(\\[0-9])/\\\\$1/g; # more sed specials
autoscript($package,"postinst","postinst-info",
"s/#SECTION#/$section/g;s:#FILE#:$fn:");
}