diff --git a/html-src/gen-html.py b/html-src/gen-html.py
index f32330fa..4ca1a5ba 100755
--- a/html-src/gen-html.py
+++ b/html-src/gen-html.py
@@ -114,7 +114,7 @@ rules_footer = '''
wikipedia_header = '''
-%s
+%(title)s
@@ -240,7 +240,7 @@ def gen_rules_html():
if dir == 'rules':
print(rules_header % {'title': title}, file=outfile)
else: # d == 'wikipedia'
- print(wikipedia_header % title, file=outfile)
+ print(wikipedia_header % {'title': title}, file=outfile)
with open(os.path.join(dir, filename), 'r', encoding='utf-8') as file:
print(file.read(), file=outfile)
print(rules_footer % {'footer': footer}, file=outfile)