nitdoc: Escape page title.
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 12 Dec 2014 19:21:06 +0000 (14:21 -0500)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 19 Dec 2014 16:46:14 +0000 (11:46 -0500)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

src/doc/doc_templates.nit

index 8384ba9..497c4cd 100644 (file)
@@ -23,7 +23,7 @@ import json::static
 class TplPage
        super Template
 
-       # Page title in HTML header
+       # The unescaped page title to put in the HTML header.
        var title: String is writable, noinit
 
        # Page url
@@ -70,7 +70,7 @@ class TplPage
                addn " <link rel='stylesheet' href='{css}/Nitdoc.QuickSearch.css'/>"
                addn " <link rel='stylesheet' href='{css}/Nitdoc.ModalBox.css'/>"
                addn " <link rel='stylesheet' href='{css}/Nitdoc.GitHub.css'/>"
-               addn " <title>{title}</title>"
+               addn " <title>{title.html_escape}</title>"
                addn "</head>"
                add "<body"
                for attr in body_attrs do add attr