django-check-seo icon indicating copy to clipboard operation
django-check-seo copied to clipboard

Errors due to escaped special chars

Open corentinbettiol opened this issue 3 years ago • 0 comments

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.

corentinbettiol avatar Nov 03 '21 15:11 corentinbettiol