[Blends-commit] [SCM] website branch, master, updated. 3ac3446688f69395404d9a6cb157c28b669a3787
Ole Streicher
olebole at debian.org
Sun Mar 6 19:48:13 UTC 2016
The following commit has been merged in the master branch:
commit 3ac3446688f69395404d9a6cb157c28b669a3787
Author: Ole Streicher <olebole at debian.org>
Date: Sun Mar 6 20:47:59 2016 +0100
Fix non-working ampersand escape char replacement
diff --git a/webtools/tasks.py b/webtools/tasks.py
index 5665e4e..1205fd6 100755
--- a/webtools/tasks.py
+++ b/webtools/tasks.py
@@ -244,15 +244,14 @@ for lang in languages:
else:
template = loader.load('tasks.xhtml')
- lines = template.generate(**data).render('xhtml').split('\n')
- for line in lines:
- # We had to mask ampersand ('&') from Genshi but even if
- # the browser shows the correct character
- # packages.debian.org gets confused - so turn it back here
- if detect_ampersand_code_re.search(line):
- line = re.sub('%26', '&', line)
+ # We had to mask ampersand ('&') from Genshi but even if the browser
+ # shows the correct character packages.debian.org gets confused.
+ # So turn it back here
with codecs.open(outputfile, "w", "utf-8") as f:
- f.write('\n'.join(lines))
+ for l in template.generate(**data).render('xhtml').split('\n'):
+ if detect_ampersand_code_re.search(l):
+ l = l.replace('%26', '&')
+ f.write(l + '\n')
SetFilePermissions(outputfile)
template = loader.load('packagelist.xhtml')
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list