]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/list_authors.tmpl
Refactor(web): Use `#filter WebSafe` instead of `cgi.escape`
[m_librarian.git] / m_librarian / web / views / list_authors.tmpl
index bdfd9fddf2abc1a48e1c704f1a1dd44d1321b5a4..a364ebaa203b9d6f54f81f9dfff42026120cef1b 100644 (file)
@@ -1,5 +1,4 @@
 #encoding utf-8
-#import cgi
 #from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список авторов'
@@ -11,11 +10,12 @@ $search_authors_form(searchList=$searchList)
 <h1>$title</h1>
 
 #if $authors
+#filter WebSafe
   <table>
   <tr>
   #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
   #for $column in $columns
-    <td style="text-align: center">$cgi.escape($_($column))</td>
+    <td style="text-align: center">$_($column)</td>
   #end for
   </tr>
   #for $author in $authors
@@ -27,12 +27,13 @@ $search_authors_form(searchList=$searchList)
     #set $style = ''
     #end if
     <td$style><a href="/books-by-author/$author.id/">
-    $cgi.escape(unicode($getattr($author, $column) or ''))
+    $unicode($getattr($author, $column) or '')
     </a></td>
   #end for
   </tr>
   #end for
   </table>
+#end filter WebSafe
 #else
   <p>Не найдено ни одного автора!</p>
 #end if