Strip tags from titles in bugTitle and meta

We need to ensure that HTML tags in 'title' are stripped in these places
or the output will be corrupted. That makes the bug reporting links are
not working properly.

Change-Id: Iddc041488cb3b0dc4d784fef92920496ce1a747f
Closes-Bug: #1713054
This commit is contained in:
Hunt Xu 2018-06-20 13:55:11 +08:00
parent 31868c9120
commit ae47423826
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
{% block header %}{% endblock %}
<title>OpenStack Docs: {{ title }}</title>
<title>OpenStack Docs: {{ title|striptags }}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

View File

@ -59,7 +59,7 @@
{%- if bug_title %}
var bugTitle = "{{ bug_title }}";
{%- else %}
var bugTitle = "{{ title }} in {{ project }}";
var bugTitle = "{{ title|striptags }} in {{ project }}";
{%- endif %}
var fieldTags = "{{ bug_tag }}";
{%- if use_storyboard %}