web/views/baseviews.py
branchstable
changeset 7815 2a164a9cf81c
parent 7310 5c8cf002919d
child 7835 c071e0b70bf5
equal deleted inserted replaced
7814:1ec9fe1dfba9 7815:2a164a9cf81c
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
   403         for attr in entity.e_schema.indexable_attributes():
   403         for attr in entity.e_schema.indexable_attributes():
   404             try:
   404             try:
   405                 value = xml_escape(entity.printable_value(attr, format='text/plain').lower())
   405                 value = xml_escape(entity.printable_value(attr, format='text/plain').lower())
   406             except TransformError, ex:
   406             except TransformError, ex:
   407                 continue
   407                 continue
   408             except:
   408             except Exception:
   409                 continue
   409                 continue
   410             if searched in value:
   410             if searched in value:
   411                 contexts = []
   411                 contexts = []
   412                 for ctx in value.split(searched):
   412                 for ctx in value.split(searched):
   413                     if len(ctx) > 30:
   413                     if len(ctx) > 30: