Last modified: 2007-06-20 07:08:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10009 - Sidebar can generate invalid HTML
Sidebar can generate invalid HTML
Status: RESOLVED DUPLICATE of bug 9338
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 4515
  Show dependency treegraph
 
Reported: 2007-05-22 22:09 UTC by Michael Daly
Modified: 2007-06-20 07:08 UTC (History)
0 users

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


Attachments

Description Michael Daly 2007-05-22 22:09:10 UTC
If one enters a heading in Mediawiki:Sidebar with an embedded blank, the resulting HTML is not valid.

Example:

Mediawiki:Sidebar contains:

* recent changes
** recentchanges-url|recentchanges

Output is:

<div class='portlet' id='p-recent changes'>  

The blank in the id is not valid.

At a minimum, in various /skins/skinname.php files, the second line of the following code should be changed from:

  <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
    <div class='portlet' id='p-<?php echo htmlspecialchars($bar); ?>'>
to:

  <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
    <div class='portlet' id='p-<?php echo str_replace( ' ', '_', htmlspecialchars($bar) ); ?>'>

It may be necessary, in general, to strip out or convert other invalid characters/symbols in the heading string.  

Note if this editing is done in /includes/Skin.php (where the data is constructed), it will result in the modified text being displayed on the wiki page.  Modifying it in the /skins/skinname.php file(s) preserves the display and only prevents the invalid HTML from being generated.
Comment 1 Rob Church 2007-06-20 07:08:30 UTC

*** This bug has been marked as a duplicate of bug 9338 ***

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


Navigation
Links