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

Undesired escaping of characters #74

Open
trueter opened this issue Aug 12, 2023 · 2 comments
Open

Undesired escaping of characters #74

trueter opened this issue Aug 12, 2023 · 2 comments

Comments

@trueter
Copy link

trueter commented Aug 12, 2023

I am passing an & character in my openGraph.basic.title field. I verified that the char is correctly passed as a prop into the SEO component, but in my final output it is changed to:
<meta property="og:title" content="[...] &#38; [...]">

Any ideas?

@jonasmerlin
Copy link
Owner

Hey @trueter, thank you for your feedback! I'll need a bit more context for this, though. Does the escaping have any unintended consequences where it doesn't get rendered correctly?

@trueter
Copy link
Author

trueter commented Aug 25, 2023

Hey @jonasmerlin - thanks for taking the time to look at this.
I've had another look at it. Some platforms correctly show the ampersand in the preview, others, like https://opengraph.dev/ don't. I would sleep better at night knowing the output is consistent across platforms. In my research I found this thread on the react repo highlighting some use cases of why fine grained control of escaping in open graph strings may be beneficial (like image urls).

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

No branches or pull requests

2 participants