-
Notifications
You must be signed in to change notification settings - Fork 27
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
og:description picks up <script... if text is short #22
Comments
related issue in jupyterbook jupyter-book/jupyter-book#1008 |
I will probably want to update the example page I sent with more text, which may hide the problem. |
After building your repo, I have noticed this issue occurring on many of the pages. The issue seems to lie in raw tags. sphinxext-opengraph does not currently ignore raw tags. Once raw tags are excluded, the description is created correctly. |
The latest release contains the fix for this issue, @cranmer . |
It seems that if the text of a page is very short that the
og:description
may pick up HTML tags in the header that aren't properly escaped, and theog:description
text will be displayed on the web page.I am using jupyterbook, which uses sphinx.
My jupyterbook has this in the
_config.yml
fileHere's an example source page
https://github.com/cranmer/stats-ds-book/blob/master/book/statistics/cramer-rao-bound.md
This gets compiled into
https://cranmer.github.io/stats-ds-book/statistics/cramer-rao-bound.html
The problematic part seems to be
As the webpage will display (not always visible, but you can see it on a phone or wide screen
It seems this was picked up from the HTML
Example:
The text was updated successfully, but these errors were encountered: