sphinxext-opengraph icon indicating copy to clipboard operation
sphinxext-opengraph copied to clipboard

Clean up description via HTML escape

Open markpeek opened this issue 1 year ago • 3 comments

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.

markpeek avatar Mar 21 '24 18:03 markpeek

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.

TheTripleV avatar Mar 22 '24 01:03 TheTripleV

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.

markpeek avatar Mar 22 '24 17:03 markpeek

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

methane avatar May 07 '24 09:05 methane