From 02e6e55f3e1cb0d40bd519081455a278f7e5737d Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 18 Feb 2015 13:43:47 +0000 Subject: [PATCH] Run force_text on searchable text --- wagtail/wagtailcore/blocks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wagtail/wagtailcore/blocks.py b/wagtail/wagtailcore/blocks.py index b476e6eb3..d977056ec 100644 --- a/wagtail/wagtailcore/blocks.py +++ b/wagtail/wagtailcore/blocks.py @@ -361,7 +361,7 @@ class CharBlock(FieldBlock): super(CharBlock, self).__init__(**kwargs) def get_searchable_content(self, value): - return [value] + return [force_text(value)] class URLBlock(FieldBlock): @@ -380,7 +380,7 @@ class RichTextBlock(FieldBlock): return mark_safe('
' + expand_db_html(value) + '
') def get_searchable_content(self, value): - return [value] + return [force_text(value)] class RawHTMLBlock(FieldBlock):