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

_getJSONLD doesn't handle https://schema.org/ with trailing / #936

Closed
danielnixon opened this issue Dec 29, 2024 · 2 comments
Closed

_getJSONLD doesn't handle https://schema.org/ with trailing / #936

danielnixon opened this issue Dec 29, 2024 · 2 comments
Labels
metadata Issues with the metadata generated by readability

Comments

@danielnixon
Copy link
Contributor

Example: https://www.theparisreview.org/fiction/8364/camouflage-adania-shibli

On that site, Readability fails to extract the author, despite it being in the json-ld:

{
	"@context": "https://schema.org/",
	"@type": "Article",
	"name": "Camouflage",
	"author": {
		"@type": "Person",
		"name": "Adania Shibli, translated by Max Weiss"
	},

The problem is the regex that Readability uses to match against the @context matches https://schema.org but it doesn't match https://schema.org/.

Updating the regex as follows (additional \/?) fixes the issue:

/^https?\:\/\/schema\.org\/?$/
@gijsk gijsk added the metadata Issues with the metadata generated by readability label Dec 31, 2024
@danielnixon
Copy link
Contributor Author

Similar to #933, this one looks like it's already fixed in source and just needs an npm package release.

@danielnixon
Copy link
Contributor Author

Closing this in favour of #941

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metadata Issues with the metadata generated by readability
Projects
None yet
Development

No branches or pull requests

2 participants