dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a605c35
)
Html::expandAttributes( array( 'foo' => null ) ); ' foo=""' -> ''
author
Daniel Friesen
<dantman@users.mediawiki.org>
Sat, 5 Feb 2011 20:28:04 +0000
(20:28 +0000)
committer
Daniel Friesen
<dantman@users.mediawiki.org>
Sat, 5 Feb 2011 20:28:04 +0000
(20:28 +0000)
Outputting ' foo="" on `foo = null` promotes the writing of overly verbose code to avoid it, and ugly methods like our old Linker::getLinkAttributesInternal, both of which are completely counter to the purpose of Html::.
includes/Html.php
patch
|
blob
|
history
diff --git
a/includes/Html.php
b/includes/Html.php
index
2e34660
..
4e6e611
100644
(file)
--- a/
includes/Html.php
+++ b/
includes/Html.php
@@
-352,7
+352,7
@@
class Html {
$ret = '';
$attribs = (array)$attribs;
foreach ( $attribs as $key => $value ) {
- if ( $value === false ) {
+ if ( $value === false
|| is_null( $value )
) {
continue;
}