Only index plain content
This commit is contained in:
parent
7475d70c95
commit
79aab1e15e
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ from django.apps import AppConfig
|
|||
from django.db import connections
|
||||
from django.db.models.signals import post_save
|
||||
import warnings
|
||||
from django.utils.html import strip_tags
|
||||
|
||||
|
||||
class CoreConfig(AppConfig):
|
||||
|
@ -28,4 +29,4 @@ class CoreConfig(AppConfig):
|
|||
if not created:
|
||||
return
|
||||
with connections["default"].cursor() as cursor:
|
||||
cursor.execute("INSERT INTO search_index(body, rowid) VALUES (%s, %s)", [instance.content, instance.pk])
|
||||
cursor.execute("INSERT INTO search_index(body, rowid) VALUES (%s, %s)", [strip_tags(instance.content), instance.pk])
|
||||
|
|
Loading…
Reference in a new issue