From d727e522b910e29b245d394cb8199a67477dd157 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 4 Jul 2017 16:48:49 +0100 Subject: [PATCH] Strip tags from navigation prev, next titles Per the Sphinx documentations: next - The next document for the navigation. This variable is either false or has two attributes link and title. The title contains HTML markup. prev - Like next, but for the previous page. If using the title value inside an element attribute, we need to ensure the HTML tags mentioned above are stripped. Failure to do so results in corrupted output. Change-Id: I5fde1e6fc4d7966fcd3e767c79535202f3b41a71 Closes-Bug: #1702328 --- openstackdocstheme/theme/openstackdocs/layout.html | 4 ++-- openstackdocstheme/theme/openstackdocs/titlerow.html | 4 ++-- ...ip-html-tags-from-navigation-titles-929c92a339413015.yaml | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/strip-html-tags-from-navigation-titles-929c92a339413015.yaml diff --git a/openstackdocstheme/theme/openstackdocs/layout.html b/openstackdocstheme/theme/openstackdocs/layout.html index e7177e6b..e5e2947c 100644 --- a/openstackdocstheme/theme/openstackdocs/layout.html +++ b/openstackdocstheme/theme/openstackdocs/layout.html @@ -64,10 +64,10 @@ ga('send', 'pageview');
{% if prev %} - + {% endif %} {% if next %} - + {% endif %} {%- if bug_project %} diff --git a/openstackdocstheme/theme/openstackdocs/titlerow.html b/openstackdocstheme/theme/openstackdocs/titlerow.html index 9549f61e..be18e117 100644 --- a/openstackdocstheme/theme/openstackdocs/titlerow.html +++ b/openstackdocstheme/theme/openstackdocs/titlerow.html @@ -8,10 +8,10 @@
{% if prev %} - + {% endif %} {% if next %} - + {% endif %} {%- if bug_project %} diff --git a/releasenotes/notes/strip-html-tags-from-navigation-titles-929c92a339413015.yaml b/releasenotes/notes/strip-html-tags-from-navigation-titles-929c92a339413015.yaml new file mode 100644 index 00000000..7bc9eb02 --- /dev/null +++ b/releasenotes/notes/strip-html-tags-from-navigation-titles-929c92a339413015.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + The navigation links now correctly strip HTML from titles, allowing for + use of markup like literal backticks in titles.