From: Tobias Brunner Date: Wed, 16 Apr 2025 13:30:35 +0000 (+0200) Subject: conf: Escape " and \ in man page output X-Git-Tag: 6.0.2dr1~7^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10c2985cddbd7f40f33162db2b3fa18c4fb80f7c;p=thirdparty%2Fstrongswan.git conf: Escape " and \ in man page output --- diff --git a/conf/format-options.py b/conf/format-options.py index e0fa180552..176a3837ca 100755 --- a/conf/format-options.py +++ b/conf/format-options.py @@ -241,6 +241,7 @@ class GroffTagReplacer(TagReplacer): if not punct: punct = '' text = re.sub(r'[\r\n\t]', ' ', m.group('text')) + text = re.sub(r'"', '""', text) return '{0}.R{1} "{2}" "{3}" "{4}"\n'.format(nl, format, brack, text, punct) return replacer @@ -305,7 +306,8 @@ class ManFormatter: def __groffize(self, text): """Encode text as groff text""" text = self.__tags.replace(text) - text = re.sub(r'(?