Commit ec4dabb5 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: we may have same href but with different title

alse replace | by br
parent ba7eec4f
...@@ -85,14 +85,14 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''): ...@@ -85,14 +85,14 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''):
continue continue
# Those 3 parts has similar codes, leave as it so that it's easy to customize for each other # Those 3 parts has similar codes, leave as it so that it's easy to customize for each other
if citation_type == "AD": if citation_type == "AD":
if citation_href not in citation_ad_doubles: if (citation_href, citation_info[0]) not in citation_ad_doubles:
citation_ad_doubles[citation_href] = citation_ad_count citation_ad_doubles[(citation_href, citation_info[0])] = citation_ad_count
citation_id = ''.join([citation_type, "-", str(citation_ad_count)]) citation_id = ''.join([citation_type, "-", str(citation_ad_count)])
citation_dict["item"] = { citation_dict["item"] = {
"type": citation_type, "type": citation_type,
"title": citation_info[0], "title": citation_info[0].replace('|', '<br/>'),
"number": citation_info[1], "number": citation_info[1].replace('|', '<br/>'),
"version": citation_info[2], "version": citation_info[2].replace('|', '<br/>'),
"href": citation_href, "href": citation_href,
"id": citation_id "id": citation_id
} }
......
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