Clean up the markup #9

Merged
merged 1 commit into from Sep 18, 2016

Conversation

Projects
None yet
3 participants
@mathiasbynens
Contributor

mathiasbynens commented May 8, 2013

I’ve mostly applied the things described here: http://mathiasbynens.be/notes/html5-levels

  • Removed useless XML prologs from HTML files

  • Switched to the <!DOCTYPE html> doctype

  • Switched to <meta charset="utf-8"> (instead of <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />) and moved it to the top of the <head>:

    As recommended by the HTML5 spec (4.2.5.5 Specifying the document's character encoding), add your charset declaration early (before any ASCII art ;) to avoid a potential encoding-related security issue in IE. It should come in the first 1024 bytes.

    The charset should also come before the <title> tag, due to potential XSS vectors.

  • Removed type="text/javascript" from <script> elements

  • Removed type="text/css" from <style> and <link rel=stylesheet> elements

  • Removed unneeded explicit references to /favicon.ico (http://mathiasbynens.be/notes/rel-shortcut-icon)

View diff here: https://github.com/rubys/feedvalidator/pull/9/files?w=1

@josephw

This comment has been minimized.

Show comment
Hide comment
@josephw

josephw Sep 18, 2016

Collaborator

Some of these changes leave those documents no longer well-formed XML. (I believe @rubys has an opinion about this.) However, briefer HTML5 seems like a clear win as an output format (even more so now, than when you opened this PR :-).

I've rolled in a couple of changes to keep the source (docs-xml) consistent with the output (docs) (e.g. 9a6d6dd) and I'll merge from that branch.

Collaborator

josephw commented Sep 18, 2016

Some of these changes leave those documents no longer well-formed XML. (I believe @rubys has an opinion about this.) However, briefer HTML5 seems like a clear win as an output format (even more so now, than when you opened this PR :-).

I've rolled in a couple of changes to keep the source (docs-xml) consistent with the output (docs) (e.g. 9a6d6dd) and I'll merge from that branch.

@josephw josephw merged commit e1c3625 into rubys:master Sep 18, 2016

@rubys

This comment has been minimized.

Show comment
Hide comment
@rubys

rubys Sep 18, 2016

Owner

Some of these changes leave those documents no longer well-formed XML. (I believe @rubys has an opinion about this.)

I've mellowed a bit since then ;-)

Owner

rubys commented Sep 18, 2016

Some of these changes leave those documents no longer well-formed XML. (I believe @rubys has an opinion about this.)

I've mellowed a bit since then ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment