kapt-labs / django-check-seo

Django Check SEO will check the SEO aspects of your site for you, and will provide advice in case of problems. Compatible with Django & Django-CMS!
GNU General Public License v3.0
154 stars 12 forks source link

Errors due to escaped special chars #47

Open corentinbettiol opened 2 years ago

corentinbettiol commented 2 years ago

Say you have this keyword:

that's awesome

Then your meta keywords will maybe contain this:

that's awesome

But your html content will contain this:

[...] and that's awesome!

Django check seo does not unescape content in keywords or in meta description (and that's cool because there can be a XSS). However, for websites who escapes specials chars in meta keywords/description tags, maybe we could use a list of authorized chars in the settings, and unescape only the keywords/description tags, like this:

DJANGO_CHECK_SEO_UNESCAPE_AUTHORIZED_CHARS = ["'", "\"", "!", "and", "so", "on", "..."]

I don't really know what to do regarding this issue for now. Its way simpler to just fix the escaping in keywords & description tags.