Page MenuHomePhabricator

Linter should lint for obsolete HTML attributes
Open, MediumPublic

Description

Right now Linter looks for obsolete tags (<tt>, <center>, and others).

It should look for obsolete or deprecated HTML attributes too (bgcolor, align, and others).

From https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes

  • align on <caption>, <col>, <colgroup>, <hr>, <iframe>, <img>, <table>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>
  • background on <body>, <table>, <td>, <th>
  • bgcolor on <body>, <col>, <colgroup>, <marquee>, <table>, <tbody>, <tfoot>, <td>, <th>, <tr>
  • border on <img>, <object>, <table>
  • color on <font>, <hr>
  • height on everything except <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video>
  • width on everything except <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video>

Then for table (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) there's also: cellpadding, cellspacing, frame, rules, summary

(Haven't yet cross-referenced which ones the Sanitizer allowed in wikitext)

Event Timeline

ssastry triaged this task as Medium priority.Aug 23 2017, 5:28 PM
Izno updated the task description. (Show Details)