Fix HTML escaping in source-highlight input.
authorethereal <ethereal@ethv.net>
Sat, 25 Jan 2020 05:08:27 +0000 (00:08 -0500)
committerethereal <ethereal@ethv.net>
Sat, 25 Jan 2020 05:08:27 +0000 (00:08 -0500)
update.py

index 046d8fd..c2c9959 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -288,7 +288,8 @@ class SourceHighlightProcessor(markdown.treeprocessors.Treeprocessor):
 
         ret = subprocess.Popen(["source-highlight", "--no-doc", "--src-lang=" + lang, "--out-format=xhtml-css"], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
 
-        ret.stdin.write(text[m.end():].encode("utf-8"))
+        data = text[m.end():]
+        ret.stdin.write(html.unescape(data).encode("utf-8"))
         ret.stdin.close()
         result = ret.stdout.read().decode()