[Pkg-mediawiki-commits] r388 - mediawiki/trunk/debian/patches
Thorsten Glaser
tg at alioth.debian.org
Tue Oct 9 11:57:04 UTC 2012
Author: tg
Date: 2012-10-09 11:57:04 +0000 (Tue, 09 Oct 2012)
New Revision: 388
Modified:
mediawiki/trunk/debian/patches/fix_invalid_xhtml.patch
Log:
<img> tags must always have an alt attribute
note: there?\226?\128?\153s another issue with Special:Upload, forwarded
as https://bugzilla.wikimedia.org/show_bug.cgi?id=40889
since I have no idea how to fix this
Modified: mediawiki/trunk/debian/patches/fix_invalid_xhtml.patch
===================================================================
--- mediawiki/trunk/debian/patches/fix_invalid_xhtml.patch 2012-10-02 12:17:54 UTC (rev 387)
+++ mediawiki/trunk/debian/patches/fix_invalid_xhtml.patch 2012-10-09 11:57:04 UTC (rev 388)
@@ -7,6 +7,7 @@
• let makeLink and all its callers remove HTML5-only attributes from
hyperlinks if someone else was not careful (rather, several someones)
• prevent <ul></ul> without any <li /> inside
+• <img> tags must always have an alt attribute
--- a/includes/HTMLForm.php
+++ b/includes/HTMLForm.php
@@ -167,3 +168,24 @@
}
}
+--- a/includes/media/MediaTransformOutput.php
++++ b/includes/media/MediaTransformOutput.php
+@@ -259,7 +259,7 @@ class ThumbnailImage extends MediaTransf
+ }
+
+ $attribs = array(
+- 'alt' => $alt,
++ 'alt' => $alt ? $alt : '(thumbnail)',
+ 'src' => $this->url,
+ 'width' => $this->width,
+ 'height' => $this->height,
+--- a/includes/specials/SpecialUpload.php
++++ b/includes/specials/SpecialUpload.php
+@@ -930,6 +930,7 @@ class UploadForm extends HTMLForm {
+ $this->addHeaderText(
+ '<div class="thumb t' . $wgContLang->alignEnd() . '">' .
+ Html::element( 'img', array(
++ 'alt' => '(thumbnail)',
+ 'src' => $mto->getUrl(),
+ 'class' => 'thumbimage',
+ ) ) . '</div>', 'description' );
More information about the Pkg-mediawiki-commits
mailing list