Commit ad3dc211 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Add autoescape in temlates

parent d07d2f77
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
import urllib

from django.utils import timezone
from django.utils.translation import ugettext as _
from django.utils.feedgenerator import Atom1Feed, Enclosure, rfc3339_date
@@ -13,8 +15,6 @@ from opds_catalog import settings
from opds_catalog.opds_middleware import BasicAuthMiddleware
from opds_catalog.opds_paginator import Paginator as OPDS_Paginator

import time

class AuthFeed(Feed):
    request = None
    def __call__(self,request,*args,**kwargs):
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
{% load i18n %}

{% block body %}
{% autoescape on %}
<table>
{%  for chars in items %}
<tr>
@@ -17,6 +18,7 @@
</tr>		
{% endfor %}
</table>
{% endautoescape %}


{% endblock %}  {# body #}
 No newline at end of file
+4 −2
Original line number Diff line number Diff line
@@ -3,20 +3,22 @@
{% load i18n %}

{% block body %}
{% autoescape on %}
<table>
{%  for chars in items %}
<tr>
	<td>
	{% if chars.cnt >= splititems %}
	   <a href="{% url "web:book" %}?lang={{lang_code}}&chars={{chars.id|urlencode|iriencode}}">{{ chars.id }}</a>
	   <a href="{% url "web:book" %}?lang={{lang_code}}&chars={{chars.id}}">{{ chars.id }}</a>
	{% else %}
	   <a href="{% url "web:searchbooks" %}?searchtype=b&searchterms={{chars.id|urlencode|iriencode}}">{{ chars.id }}</a>
	   <a href="{% url "web:searchbooks" %}?searchtype=b&searchterms={{chars.id}}">{{ chars.id }}</a>
	{% endif %}
	<span style="font-size:80%">{% blocktrans with chars_cnt=chars.cnt %}Total: {{ chars_cnt }} books.{% endblocktrans %}</span>
	</td>
</tr>		
{% endfor %}
</table>
{% endautoescape %}


{% endblock %}  {# body #}
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
{% load i18n %}

{% block body %}
{% autoescape on %}
<table>
{%  for g in items %}
<tr>
@@ -17,6 +18,6 @@
</tr>		
{% endfor %}
</table>

{% endautoescape %}

{% endblock %}  {# body #}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
{% load i18n %}

{% block body %}
{% autoescape on %}
<table>
{%  for chars in items %}
<tr>
@@ -17,6 +18,7 @@
</tr>		
{% endfor %}
</table>
{% endautoescape %}


{% endblock %}  {# body #}
 No newline at end of file