Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Strip out Sphinx's '¶' permalinks when indexing.

Thanks, Daniel Lindsley.
  • Loading branch information...
commit f9779dd96f56448a4970fc3c8e11851fa5342be5 1 parent d2c33ab
@jacobian jacobian authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 django_website/docs/search_indexes.py
View
4 django_website/docs/search_indexes.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8-*-
+
import json
from django.conf import settings
from django.utils.html import strip_tags
@@ -21,6 +23,6 @@ def prepare_text(self, obj):
docpath = utils.get_doc_path(root, obj.path)
with open(docpath) as fp:
doc = json.load(fp)
- return strip_tags(doc['body'])
+ return strip_tags(doc['body']).replace(u'', '')
haystack.site.register(Document, DocumentIndex)
Please sign in to comment.
Something went wrong with that request. Please try again.