Html::srcSet: allow density to be specified either with or without trailing 'x'
authorOri Livneh <ori@wikimedia.org>
Fri, 3 Apr 2015 23:17:13 +0000 (16:17 -0700)
committerOri.livneh <ori@wikimedia.org>
Sun, 5 Apr 2015 05:22:47 +0000 (05:22 +0000)
commit6333fa6191ca5a2f5823ad4185a6e699e8674cfc
tree43935c5a03b473c87b90a5e919fe7331a4721232
parent34793c8c70ec492197eaf85736a56790a0a9faf0
Html::srcSet: allow density to be specified either with or without trailing 'x'

$wgLogoHD is meant to contain high-density alternatives for $wgLogo, but its
keys include the trailing 'x' (e.g., '1.5x'), making it unusable with
Html::srcSet(). Fix that by normalizing all density values to have a
single trailing 'x'.

Change-Id: I62cc3a9e4aeff3a7cb102de2965b8b40fd106c37
includes/Html.php
tests/phpunit/includes/HtmlTest.php