cobrateam / cobrateam/django-htmlmin

<noscript> content html-escaped despite it's marked safe

Open
#96 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
542
Forks
72
PR merge metrics
No merged PRs in 30d

Description

Django template

``` html

{{ code|safe }}
```

Template output with htmlmin middlewares added to `settings.MIDDLEWARE_CLASSES`

``` html

<iframe src="https://..."></iframe>
```

Template output after removing htmlmin middlewares:

``` html

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with a Django template using {{ code|safe }} and the htmlmin middleware configured in settings.MIDDLEWARE_CLASSES. Trace how the middleware handles noscript content, then verify that markup inside a safe noscript value remains unescaped while ordinary HTML is still minified.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.