wpilibsuite / sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
https://sphinxext-opengraph.readthedocs.io
Other
69 stars 25 forks source link

Clean up description via HTML escape #120

Open markpeek opened 4 months ago

markpeek commented 4 months ago

As the description is taken from the raw text of the document it can contain some HTML reserved characters. This change will escape the description string to use HTML entities instead.

This was causing an error when generating a sphinx EPUB document.

TheTripleV commented 4 months ago

I wonder what users of og:desc do. Like how slack and discord embeds display the escaped version. It should be fine but just wanna check.

markpeek commented 3 months ago

Thanks @TheTripleV for looking into the PR. I created a quick reproduction of the issue via this repo in case you wanted to look at it yourself.

methane commented 2 months ago

I want to remove all opengraph meta tag from ePub. Would you check if app.builder.embedded: return in html_page_context?