You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that any RichTextBlock instances are passing their HTML string values straight through the streamfield resolver. This results in Wagtail's proprietary faux-HTML being exposed.
E.g. internal links in Wagtail's RichTextBlock are stored as such:
<a id="7" linktype="page">link to somewhere internal</a>
When Wagtail renders this to a final template the HTML is normally rewritten using some specific rewriter functions. The above example, when rewritten, would then become something like:
<a href="/somewhere">link to somewhere internal</a>
wagtail-graphql doesn't seem to do this.
There is a handy helper function available called expand_db_html which could be leveraged.
Or maybe I'm not doing it right? Should I register these rewriters specifically?
The text was updated successfully, but these errors were encountered:
It seems that any
RichTextBlock
instances are passing their HTML string values straight through the streamfield resolver. This results in Wagtail's proprietary faux-HTML being exposed.E.g. internal links in Wagtail's
RichTextBlock
are stored as such:When Wagtail renders this to a final template the HTML is normally rewritten using some specific rewriter functions. The above example, when rewritten, would then become something like:
wagtail-graphql
doesn't seem to do this.There is a handy helper function available called expand_db_html which could be leveraged.
Or maybe I'm not doing it right? Should I register these rewriters specifically?
The text was updated successfully, but these errors were encountered: