nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
392 stars 192 forks source link

Escape not required for meta description #699

Closed corentinbettiol closed 1 year ago

corentinbettiol commented 2 years ago

Description

Djangocms-blog is escaping meta description in get_description (in Post and BlogCategory), but django-meta already escape all meta tags.

The result is that keywords (and other meta tags that don't use meta description) are single escaped (in django-meta), and that description (and all other meta tags that use meta description as a source) are double escaped (one time in djangocms-blog, and one time in django-meta):

image The & is replaced by &.

Steps to reproduce

Versions

All versions since this commit (2014).

Expected behaviour

Meta description and keywords should be encoded only one time.

Actual behaviour

Meta description and related meta tags are encoded two times: