Commit 48b6593b authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_js_style: fix attributes HTML escaping

Attribute must be quoted
parent e80ea85d
......@@ -17,7 +17,7 @@ def generateSectionListHTML(result_list, section_list):
for section in section_list:
# Add missing / suffix to get correct relative url generation
# XXX Fix WebSection_getSiteMapTree instead, but no idea what would be the site effects
result_list.append('<li><a href="%s/">%s</a>' % (_(section['url']), __(section['translated_title'])))
result_list.append('<li><a href="%s">%s</a>' % (__(section['url'] + '/'), _(section['translated_title'])))
generateSectionListHTML(result_list, section['subsection'])
result_list.append('</li>')
result_list.append('</ul>')
......@@ -40,12 +40,12 @@ for language in available_language_set:
website_url_set[language] = re.sub(website_url_pattern, r'%s/%s/\1' % (root_website_url, language), web_site.absolute_url())
for language, url in website_url_set.items():
result_list += '<li><a href="%s" hreflang="%s"><abbr lang="%s">%s</abbr></a></li>' % (__(url), _(language), _(language), __(language))
result_list += '<li><a href="%s" hreflang="%s"><abbr lang="%s">%s</abbr></a></li>' % (__(url), __(language), __(language), _(language))
result_list.append('</ul></nav>')
# Sitemap
result_list.append('<nav id="sitemap">')
result_list.append('<a href="%s">%s</a>' % (_(web_site.absolute_url()), __(web_site.getTranslatedTitle())))
result_list.append('<a href="%s">%s</a>' % (__(web_site.absolute_url()), _(web_site.getTranslatedTitle())))
generateSectionListHTML(result_list, web_site.WebSection_getSiteMapTree(depth=99, include_subsection=1))
result_list.append('</nav>')
......
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