Jack Phoenix has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/208575

Change subject: Underscores etc. aren't valid in HTML IDs, so escape them 
properly
......................................................................

Underscores etc. aren't valid in HTML IDs, so escape them properly

This was an issue where a skin's/extension's name would contain spaces,
i.e. "Cologne Blue", "Renameuser for CentralAuth". Such a name would be
passed as-is to the HTML ID, but spaces aren't valid in IDs, and this
would in turn lead to HTML validation issues. Currently the English
Wikipedia's Special:Version page has 26 validation issues and this patch
fixes the supermajority of them.

Change-Id: Ia197b0208fa2abfebbea1cb23f08822db2938162
---
M includes/specials/SpecialVersion.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/208575/1

diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 9a1c5e5..74fea7c 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -842,7 +842,7 @@
                // Finally! Create the table
                $html = Html::openElement( 'tr', array(
                                'class' => 'mw-version-ext',
-                               'id' => "mw-version-ext-{$extension['name']}"
+                               'id' => 'mw-version-ext-' . 
Sanitizer::escapeId( $extension['name'] )
                        )
                );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/208575
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia197b0208fa2abfebbea1cb23f08822db2938162
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <j...@countervandalism.net>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to