Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/236559
Change subject: Adds * wildcard as an attribute specifier in HTMLTags Extension For example, a configuration line could read $wgHTMLTagsAttributes['img'] = array( '*' ); to allow IMG tags with any set of attributes, without needing to come up with a comprehensive list. ...................................................................... Adds * wildcard as an attribute specifier in HTMLTags Extension For example, a configuration line could read $wgHTMLTagsAttributes['img'] = array( '*' ); to allow IMG tags with any set of attributes, without needing to come up with a comprehensive list. Change-Id: Ie94c15535c5b1872d2219fd938a7449c96f7223c --- M HTMLTags_body.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HTMLTags refs/changes/59/236559/1 diff --git a/HTMLTags_body.php b/HTMLTags_body.php index cb8aeb4..f477b7d 100644 --- a/HTMLTags_body.php +++ b/HTMLTags_body.php @@ -46,7 +46,8 @@ $attributes = array(); foreach ( $args as $key => $value ) { if ( $key == 'tagname' ) { continue; } - if ( in_array( $key, $wgHTMLTagsAttributes[$tagName] ) ) { + if ( in_array( $key, $wgHTMLTagsAttributes[$tagName] ) + || in_array( '*', $wgHTMLTagsAttributes[$tagName] ) ) { $value = $parser->replaceVariables( $value, $frame ); // Prevent JS injection into, for instance, // the "href" attribute. -- To view, visit https://gerrit.wikimedia.org/r/236559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie94c15535c5b1872d2219fd938a7449c96f7223c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/HTMLTags Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits