Melissa (asciident) wrote in suggestions,

HTML validations - specific improvements

HTML validations - specific improvements

Short, concise description of the idea
I am suggesting this for a user who does not have an account here. The original can be found here. This is a suggestion for specific improvements to create more valid HTML.

Full description of the idea
Issue 1 - head links

Code automatically inserted by the system into the <head> of the pages breaks both HTML and XHTML. The code inserted into my journal is:

<meta content="noindex" name="robots"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link title="RSS" href="" type="application/rss+xml" rel="alternate" />

HTML is broken by the third line ending in /> - error message "text is not allowed here; try wrapping the text in a more descriptive container" (with the error marker pointing at the >).

XHTML is broken by the first two lines, which are opening tags without either a closing tag or ending in />. I have not tested this.

As the vast majority of users use HTML rather than XHTML I suggest removing the / from the RSS link.

Issue 2 - lj user tag

Code generated by the system to implement the <lj user=...> tag is not valid HTML, using non-standard Netscape additions to HTML. The code inserted into my journal (for <lj user=rubber_soul>) is:

<nobr><a href=""><img height="17" border="0" src="" align="absmiddle" width="17"></a><b><a href="">rubber_soul</a></b></nobr>

HTML is broken by this, with these error messages: "element "NOBR" undefined"", "value of attribute "ALIGN" cannot be "ABSMIDDLE"; must be one of "TOP", "MIDDLE", "BOTTOM", "LEFT", "RIGHT" ", "required attribute "ALT" not specified". Bearing in mind that users might also want to format the text of usernames to suit their journals, I suggest the following code as replacement:

<a href=""><img height="17" border="0" src="" align="middle" width="17" alt="User info"></a> <span class=ljuser><a href="">rubber_soul</a></span>

With a default addition to the <style> in the <head> of the styles of:

.ljuser { font-weight: bold; }

Again, this is not my, asciident's, suggestion. I am posting this here for a user who does not have an LJ account.

An ordered list of benefits

  • Valid HTML
  • An ordered list of problems/issues involved

  • Time involved in changing the code
  • Styles can't be gauranteed to handle the .ljuser class
  • An organized list, or a few short paragraphs detailing suggestions for implementation

  • Determine if it's worth it ;)
  • Determine the best (technical) solution
  • Someone writes the patch, puts it in Zilla
  • Review, apply
  • Tags: ~ historical
    • Post a new comment


      Anonymous comments are disabled in this journal

      default userpic

      Your reply will be screened

      Your IP address will be recorded