Last modified: 2010-05-15 15:33:59 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 T5071, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3071 - Tags defined in $htmlattrs are not rendered as html tags on screen
Tags defined in $htmlattrs are not rendered as html tags on screen
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.4.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.tmbw.net/wiki/index.php/Te...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-07 21:48 UTC by Brad Will (tmbw.net)
Modified: 2010-05-15 15:33 UTC (History)
0 users

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


Attachments

Description Brad Will (tmbw.net) 2005-08-07 21:48:50 UTC
I have several tags, including "iframe", that are defined as being allowed html
tags in the $htmlattrs variable in Parser.php.

http://meta.wikimedia.org/wiki/HTML#Permitted_HTML

However, when i try to draw the page, these values are escaped, and not returned
as html tags.  See this example:

http://www.tmbw.net/wiki/index.php/Template:Song_Nav_Stub

According to all documentation i can find, i am doing it correctly.  Here's the
example from my Parser.php file:

	function getHTMLattrs () {
		$htmlattrs = array( # Allowed attributes--no scripting, etc.
				'title', 'align', 'lang', 'dir', 'width', 'height',
				'bgcolor', 'clear', /* BR */ 'noshade', /* HR */
				'cite', /* BLOCKQUOTE, Q */ 'size', 'face', 'color',
				/* FONT */ 'type', 'start', 'value', 'compact',
				/* For various lists, mostly deprecated but safe */
				'summary', 'width', 'border', 'frame', 'rules',
				'cellspacing', 'cellpadding', 'valign', 'char',
				'charoff', 'colgroup', 'col', 'span', 'abbr', 'axis',
				'headers', 'scope', 'rowspan', 'colspan', /* Tables */
				'id', 'class', 'name', 'style', 'iframe', 'src', 'frameborder', 'scrolling'
				);
		return $htmlattrs ;
Comment 1 Brion Vibber 2005-08-08 15:18:03 UTC
That's the whitelist of HTML attributes, not elements.

Check the arrays in removeHTMLtags().

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


Navigation
Links