MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/391141 )

Change subject: WIP: make {{anchorencode:}} work with HTML5 section IDs
......................................................................

WIP: make {{anchorencode:}} work with HTML5 section IDs

Change-Id: If8098e3e839e8ba1cf27b6053017e818c556a733
---
M includes/parser/CoreParserFunctions.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/391141/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index bb0072c..07944d4 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -930,7 +930,8 @@
         */
        public static function anchorencode( $parser, $text ) {
                $text = $parser->killMarkers( $text );
-               return (string)substr( $parser->guessSectionNameFromWikiText( 
$text ), 1 );
+               $section = (string)substr( 
$parser->guessSectionNameFromWikiText( $text ), 1 );
+               return Sanitizer::safeEncodeAttribute( $section );
        }
 
        public static function special( $parser, $text ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8098e3e839e8ba1cf27b6053017e818c556a733
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>

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

Reply via email to