Strip HTML entities from the browser's window title. Closes GitLab issue #517. Thanks to Daniel Carrico @daniel1113 for the report.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-10-03 20:17:13 -04:00
parent 08a69f534e
commit 071e0db610
2 changed files with 5 additions and 0 deletions

View File

@@ -14,6 +14,9 @@
* Add support for indexing on OCR content changes.
* Add support for reindexing document on content parsing
changes.
* Strip HTML entities from the browser's window title.
Closes GitLab issue #517. Thanks to Daniel Carrico @daniel1113
for the report.
3.1.3 (2018-09-27)
==================

View File

@@ -114,5 +114,7 @@
<script>
document.title = '{% filter escapejs %}{% spaceless %}{% block title %}{% endblock %} :: {% block project_name %}{% smart_setting "COMMON_PROJECT_TITLE" %}{% endblock %}{% endspaceless %}{% endfilter %}';
// Strip HTML entities from the title
document.title = document.title.replace(/&(?:[a-z\d]+|#\d+|#x[a-f\d]+);/ig, '');
afterBaseLoad();
</script>