Skip to content

HTML not XHTML compliant #2121

@brianmay

Description

@brianmay

Hello,

I use DEFAULT_CONTENT_TYPE = "application/xhtml+xml" in my code. In fact stuff breaks if I don't use it.

It would be good if I could use it and not break the HTML pages in django-rest-framework. This only affects the login page.

Simple problems I have observed include:

html tag needs to be <html xmlns="http://www.w3.org/1999/xhtml">

Tag namaes should be lowercase; this breaks <Label ...>...</label>

Tags need to be terminated, e.g. <input ... /> instead of <input>.

The quick and dodgy fix would be to add the following to login_base.html, same as base.html:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

This basically overrides my XHTML declaration and says the page is HTML.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions