From: Vincent Bernat Date: Sun, 13 Jan 2013 13:33:45 +0000 (+0100) Subject: web: don't display header/footer for manual pages X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf19ceb84f3181a89b39e57e79d1a99b0b907dc3;p=thirdparty%2Flldpd.git web: don't display header/footer for manual pages --- diff --git a/extensions/text.py b/extensions/text.py index db327c6f..a4b4344c 100644 --- a/extensions/text.py +++ b/extensions/text.py @@ -45,9 +45,6 @@ class IncludeManpagePlugin(Plugin): # Escape HTML sequences output = cgi.escape(output) - # Add
for new lines - output = output.replace("\n", "
") - # Dots output = re.sub('\\+\b\\+\bo\bo', '»', output) @@ -57,4 +54,7 @@ class IncludeManpagePlugin(Plugin): output = re.sub('_\b(.)', r'\1', output) output = re.sub(r'\\', '', output) + # Remove header and footers and use
for new lines + output = "\n".join(output.split("\n")[2:-3]) + return output.decode('ascii', errors='replace')