It turns out that #18 didn't just eliminate the need for a custom |draft_text template filter - it makes the |richtext filter unnecessary as well. |richtext is only needed to convert plain strings of Wagtail-DB-HTML into real HTML; when working with wagtail.wagtailcore.rich_text.RichText objects, as wagtaildraftail now does, the filter has no effect (since the RichText.__html__ method deals with the conversion itself):
(The only reason Wagtail's RichTextField still uses plain strings instead of RichText objects is backwards compatibility - there might be existing user code that assumes it can manipulate it as a string. Having seen how well it works here, though, I'm tempted to switch to RichText objects for Wagtail 2.0 now!)
It turns out that #18 didn't just eliminate the need for a custom
|draft_text
template filter - it makes the|richtext
filter unnecessary as well.|richtext
is only needed to convert plain strings of Wagtail-DB-HTML into real HTML; when working withwagtail.wagtailcore.rich_text.RichText
objects, as wagtaildraftail now does, the filter has no effect (since theRichText.__html__
method deals with the conversion itself):https://github.com/wagtail/wagtail/blob/0f5640b2129df9bea66f72d3107a495d70baa411/wagtail/wagtailcore/templatetags/wagtailcore_tags.py#L61-L63
(The only reason Wagtail's RichTextField still uses plain strings instead of RichText objects is backwards compatibility - there might be existing user code that assumes it can manipulate it as a string. Having seen how well it works here, though, I'm tempted to switch to RichText objects for Wagtail 2.0 now!)