peterbe / django-static

Template tags for better serving static files from templates in Django
BSD 2-Clause "Simplified" License
193 stars 28 forks source link

Add content type to slimall and staticall #24

Closed jeanlucmongrain closed 7 years ago

jeanlucmongrain commented 12 years ago

HTML requires things such as <script> to specify type:

<script type="text/javascript" src="/javascript/myscript.js"></script>

it work well with *file tags.

but with staticall or slimall:

return as just

<script src="pathtocompiledfile.js"></script>

this fail validation in w3c.org validator

peterbe commented 12 years ago

Really?! What doctype is that? I know that HTML5 <!doctype html> allows it just fine.

Perhaps if XHTML requires it, the bug is that it shouldn't remove it if it was defined.

peterbe commented 12 years ago

Can you please double-check which doctypes require the type and I'll try to get around to making an upgrade.

jeanlucmongrain commented 12 years ago

XHTML, you were right

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">