G'day All,
This post was prompted by ambrus' comment, in Re^4: Approved PM markup?:
"You may try to petition us with a complete proposal of what attributes to enable in what elements, and then maybe I'll write a patch and maybe some god will apply it."
However, I'd much rather see discussion and concensus before submitting any proposal; accordingly, please freely discuss the following and let's see if a concensus can be reached.
For reference, here's the currently approved elements and attributes: Perl Monks Approved HTML tags
Firstly, the non-standard <code> tag requires a little more explanation than the remainder do, so I'll deal with that first. (Assume everything here also applies to the <c> tag.)
I pretty much like everything about the <code> tag except for the fact that it renders Unicode characters with code points greater than 255 (U+00FF) as character entity references. To illustrate, consider this markup:
<pre> U+007E: ~ U+007F: DEL U+00FF: ÿ U+0100: Ā </pre> <code> U+007E: ~ U+007F: DEL U+00FF: ÿ U+0100: Ā </code>
which renders as
U+007E: ~ U+007F: DEL U+00FF: ÿ U+0100: Ā
U+007E: ~ U+007F: DEL U+00FF: ÿ U+0100: Ā
So, in order to post code containing these characters, we need to use <pre> (or <tt> for inline text). When we do this, we lose all the features of <code>, such as code-wrapping and the [download] function.
Therefore, I'd like to suggest a uni attribute for <code> that might be used either as <code uni="1"> or, given <code> is non-standard anyway, and won't appear in the final HTML, just <code uni>. Unless feedback indicates otherwise, I'll recommend: <code uni>.
It would, of course, be important, that <code uni> still renders character entity references as written; e.g. > still renders as > and not >.
Update (code): This is not something that can be done easily, so I've removed it from the proposal. See ambrus' comment below.
I'm not suggesting any changes to the remaining non-standard elements: <spoiler> and <readmore>. Having said that, I do note that <readmore> allows a title attribute whereas <spoiler> does not: feel free to argue the case for <spoiler title="...">.
These are all straightforward and simply represent attributes that are missing from certain elements but allowed elsewhere. I'm really just aiming for consistency here.
| Attribute | Elements to Allow this Attribute |
|---|---|
| class | All standard elements that don't currently allow it. |
| dir | All standard elements that don't currently allow it, except br. |
| lang | All standard elements that don't currently allow it, except br. |
| title | All standard elements that don't currently allow it. |
I've no idea what the <wbr> tag is. It's not standard HTML (see Index of the HTML4 Elements), nor is it documented as being non-standard.
Unless there's a good reason to keep it, removal would seem to be the appropriate action. Conversely, if we want to keep it, it should be documented. I'll recommend removal unless feedback indicates otherwise.
Update (wbr): Feedback has indicated otherwise (see Re: Additions to Approved HTML ( ISO-8859-1)): this just needs documenting.
-- Ken
In reply to Additions to Approved HTML by kcott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |