lib/html: escape Bootstrap links titles
authorAlexandre Terrasa <alexandre@moz-code.org>
Sun, 10 Jun 2018 22:44:07 +0000 (18:44 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 22 Jun 2018 03:42:10 +0000 (23:42 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/html/bootstrap.nit
src/doc/doc_down.nit
src/doc/templates/templates_html.nit

index cc3d6e2..3e12dd7 100644 (file)
@@ -72,7 +72,7 @@ class Link
        redef fun rendering do
                add "<a{render_css_classes} href=\"{href}\""
                var title = self.title
-               if title != null then add " title=\"{title.write_to_string}\""
+               if title != null then add " title=\"{title.html_escape}\""
                add ">{text}</a>"
        end
 end
index f02b1fd..c47da0b 100644 (file)
@@ -22,7 +22,7 @@ private import parser_util
 redef class MDoc
 
        # Synopsis HTML escaped.
-       var synopsis: String is lazy do return content.first.html_escape
+       var synopsis: String is lazy do return content.first
 
        # Comment without synopsis HTML escaped
        var comment: String is lazy do
index 4faf0a6..4a2100d 100644 (file)
@@ -47,7 +47,7 @@ redef class MEntity
                end
                var mdoc = self.mdoc_or_fallback
                if title == null and mdoc != null then
-                       title = mdoc.synopsis.html_escape
+                       title = mdoc.synopsis
                end
                return new Link(html_url, text, title)
        end