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

DJANGO_CHECK_SEO_EXCLUDE_CONTENT does not exclude content in conditional comments #44

Open adrien-delhorme opened 3 years ago

adrien-delhorme commented 3 years ago

Describe the bug The content inside html conditional comments is not excluded even though it is referenced in DJANGO_CHECK_SEO_EXCLUDE_CONTENT setting.

To Reproduce Steps to reproduce the behavior:

Considering the following template:

<body>
  <!--[if lt IE 8]>
    <p class="catch-me-if-you-can"></p>
  <![endif]-->
</body>
  1. Add DJANGO_CHECK_SEO_EXCLUDE_CONTENT = ".catch-me-if-you-can" in your settings
  2. Click on "Check SEO" toolbar button
  3. Check the "Raw data" section
  4. See that .catch-me-if-you-can HTML tag is not excluded

Expected behavior .catch-me-if-you-can HTML tag is excluded.