Commit 9c79cde0 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Sven Franck

erp5_corporate_identity: make sure header list has element before access

parent c3304c6f
...@@ -9,7 +9,9 @@ def pushDown(level): ...@@ -9,7 +9,9 @@ def pushDown(level):
return ''.join(["h", str(level), ">"]) return ''.join(["h", str(level), ">"])
for header in re.findall("<h[1-6].*</h[1-6]>", content or ""): for header in re.findall("<h[1-6].*</h[1-6]>", content or ""):
tag = re.findall("<(h[1-6]>)", header)[0] #h2> header_list = re.findall("<(h[1-6]>)", header)
if len(header_list):
tag = header_list[0] #h2>
key = tag[1] key = tag[1]
content = content.replace( content = content.replace(
header, header,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment