Last modified: 2013-09-25 20:09:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43545, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41545 - Parser does not permit nested <kbd> tags.
Parser does not permit nested <kbd> tags.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-30 13:03 UTC by Daniel Friesen
Modified: 2013-09-25 20:09 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Friesen 2012-10-30 13:03:14 UTC
When you nest a HTML <kbd> inside another <kbd> MediaWiki parses it incorrectly and outputs one <kbd> element and escaped &lt;kbd&gt; tags.

ie: The input <kbd><kbd>...</kbd></kbd>
incorrectly becomes: <kbd>&lt;kbd&gt;...</kbd>&lt;/kbd&gt;

This is very important because HTML5 says this about the <kbd> element:

When the kbd element is nested inside a samp element, it represents the input as it was echoed by the system.

When the kbd element contains a samp element, it represents input based on system output, for example invoking a menu item.

When the kbd element is nested inside another kbd element, it represents an actual key or other single unit of input as appropriate for the input mechanism.

In other words this is valid html:
<kbd><kbd>Shift</kbd>+<kbd>F3</kbd></kbd>

Which semantically means user input with the nested <kbd> elements identifying individual keypresses.

Note that if you have tidy enabled the bug does not show up.
Comment 1 Daniel Friesen 2012-10-30 13:31:34 UTC
Same goes for <var>.
Comment 2 Daniel Friesen 2012-10-30 13:36:11 UTC
I6ad64e6e
Comment 3 Gerrit Notification Bot 2013-05-14 02:27:30 UTC
https://gerrit.wikimedia.org/r/30775 (Gerrit Change I6ad64e6eb4c9b5bdc15be513f55c58f6717c3939) | change APPROVED and MERGED [by jenkins-bot]
Comment 4 Brion Vibber 2013-09-25 20:09:45 UTC
This seems to have landed months ago, and seems to work at https://www.mediawiki.org/wiki/Bug41545

Resolving as fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links