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

Sanitizing SEO fields #169

Open
Ben-Kemp-8433 opened this issue Feb 13, 2024 · 0 comments
Open

Sanitizing SEO fields #169

Ben-Kemp-8433 opened this issue Feb 13, 2024 · 0 comments

Comments

@Ben-Kemp-8433
Copy link

One of our customers recently ran into the issue that the meta-description and opengraph-description fields aren't being sanitized.

On their page they added " and > in their descriptions as a form of textual markup.

This resulted in the {{ aardvark-seo:head }} tag finishing out on the start of the ", and the remainder of the description being pushed into the head until it ran into the >, which closed the head and threw the remainder into the body.

After a little digging in your source code it seemed as easy as adding the sanitize modifier to the meta_description and og_description echos. However it might be better to add the sanitize modifier to all echos within the head and body tags.

Thank you in advance!

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

No branches or pull requests

1 participant