Commits

Oben Sonne committed 5e1c047

Use new escape function in bootstrap theme

  • Participants
  • Parent commits 5ef0d36

Comments (0)

Files changed (1)

File themes/bootstrap/page.html

 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>{{ htmlspecialchars(page["title"]) }}</title>
+    <title>{{ hx(page["title"]) }}</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="{{ htmlspecialchars(page.get('description', '')) }}">
-    <meta name="keywords" content="{{ htmlspecialchars(page.get('keywords', '')) }}" />
+    <meta name="description" content="{{ hx(page.get('description', '')) }}">
+    <meta name="keywords" content="{{ hx(page.get('keywords', '')) }}" />
     <!-- css -->
     <link href="css/bootstrap.css" rel="stylesheet">
     <link href="css/bootstrap-responsive.css" rel="stylesheet">
                   entry = '<li class="%s"><a href="%s">%s</a></li>'
                   for p in mpages:
                       style = p["title"] == page["title"] and "active" or ""
-                      print(entry % (style, htmlspecialchars(p["url"]), htmlspecialchars(p["title"])))
+                      print(entry % (style, p["url"], hx(p["title"])))
               %-->
               <li class="dropdown">
                 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Poole <b class="caret"></b></a>
       <div class="container">
         <div class=page-header>
           <h1>
-            {{ page["title"] }}
-            <!--%
-                if page.get('subtitle'):
-                    print('<small>%s</small>' % htmlspecialchars(p["subtitle"]))
-            %-->
+            {{ hx(page["title"] }}
           </h1>
         </div>
         <div class="row">