equal
deleted
inserted
replaced
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: |