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

Use strip_tags for annotation show

parent 08fe5892
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.db.models import Count, Min
from django.utils.html import strip_tags

from opds_catalog.models import Book, Catalog, Author, Genre, Series, bookshelf, Counter, lang_menu
from opds_catalog import models
@@ -235,7 +236,7 @@ class CatalogsFeed(AuthFeed):
              
        for row in books_list[op.d2_first_pos:op.d2_last_pos+1]:
            p = {'is_catalog':0, 'lang_code': row.lang_code, 'filename': row.filename, 'path': row.path, \
                  'registerdate': row.registerdate, 'id': row.id, 'annotation': row.annotation, \
                  'registerdate': row.registerdate, 'id': row.id, 'annotation': strip_tags(row.annotation), \
                  'docdate': row.docdate, 'format': row.format, 'title': row.title, 'filesize': row.filesize//1000,
                  'authors':row.authors.values(), 'genres':row.genres.values(), 'series':row.series.values()}         
            items.append(p)
@@ -465,7 +466,7 @@ class SearchBooksFeed(AuthFeed):
        
        for row in books[start:finish+1]:
            p = {'doubles':0, 'lang_code': row.lang_code, 'filename': row.filename, 'path': row.path, \
                  'registerdate': row.registerdate, 'id': row.id, 'annotation': row.annotation, \
                  'registerdate': row.registerdate, 'id': row.id, 'annotation': strip_tags(row.annotation), \
                  'docdate': row.docdate, 'format': row.format, 'title': row.title, 'filesize': row.filesize//1000,
                  'authors':row.authors.values(), 'genres':row.genres.values(), 'series':row.series.values()}       
            if summary_DOUBLES_HIDE:
+4 −3
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ from django.utils.translation import ugettext as _
from django.contrib.auth import authenticate, login, logout, REDIRECT_FIELD_NAME
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse, reverse_lazy
from django.utils.html import strip_tags

from opds_catalog import models
from opds_catalog.models import Book, Author, Series, bookshelf, Counter, Catalog, Genre, lang_menu
@@ -191,7 +192,7 @@ def SearchBooksView(request):
        
        for row in books[start:finish+1]:
            p = {'doubles':0, 'lang_code': row.lang_code, 'filename': row.filename, 'path': row.path, \
                  'registerdate': row.registerdate, 'id': row.id, 'annotation': row.annotation, \
                  'registerdate': row.registerdate, 'id': row.id, 'annotation': strip_tags(row.annotation), \
                  'docdate': row.docdate, 'format': row.format, 'title': row.title, 'filesize': row.filesize//1000,
                  'authors':row.authors.values(), 'genres':row.genres.values(), 'series':row.series.values()}
            if summary_DOUBLES_HIDE:
@@ -345,7 +346,7 @@ def CatalogsView(request):
          
    for row in books_list[op.d2_first_pos:op.d2_last_pos+1]:
        p = {'is_catalog':0, 'lang_code': row.lang_code, 'filename': row.filename, 'path': row.path, \
              'registerdate': row.registerdate, 'id': row.id, 'annotation': row.annotation, \
              'registerdate': row.registerdate, 'id': row.id, 'annotation': strip_tags(row.annotation), \
              'docdate': row.docdate, 'format': row.format, 'title': row.title, 'filesize': row.filesize//1000,
              'authors':row.authors.values(), 'genres':row.genres.values(), 'series':row.series.values()}         
        items.append(p)
+1 −1

File changed.

Contains only whitespace changes.