Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTextBlock link and embed HTML isn't rewritten #9

Open
PeterDekkers opened this issue Oct 23, 2019 · 0 comments
Open

RichTextBlock link and embed HTML isn't rewritten #9

PeterDekkers opened this issue Oct 23, 2019 · 0 comments

Comments

@PeterDekkers
Copy link

PeterDekkers commented Oct 23, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant