r104637 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104636‎ | r104637 | r104638 >
Date:00:41, 30 November 2011
Author:brion
Status:ok
Tags:
Comment:
MFT r104635, r104636 - test & fix for bug 32712.
Modified paths:
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes/search/SearchUpdate.php (modified) (history)
  • /branches/REL1_18/phase3/tests/phpunit/includes/search/SearchUpdateTest.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -3,6 +3,18 @@
44 Security reminder: MediaWiki does not require PHP's register_globals
55 setting since version 1.2.0. If you have it on, turn it '''off''' if you can.
66
 7+== MediaWiki 1.18.1 ==
 8+
 9+????-??-??
 10+
 11+????????????????????????????????????????????????????????????
 12+
 13+=== Changes since 1.18.0 ===
 14+
 15+* (bug 32712) Fix for search indexing of pages with certain unicode chars following URL
 16+
 17+
 18+
719 == MediaWiki 1.18 ==
820 2011-11-24
921
Index: branches/REL1_18/phase3/tests/phpunit/includes/search/SearchUpdateTest.php
@@ -77,4 +77,14 @@
7878 'Bug 18609'
7979 );
8080 }
 81+
 82+ function testBug32712() {
 83+ $text = "text „http://example.com“ text";
 84+ $result = $this->updateText( $text );
 85+ $processed = preg_replace( '/Q/u', 'Q', $result );
 86+ $this->assertTrue(
 87+ $processed != '',
 88+ 'Link surrounded by unicode quotes should not fail UTF-8 validation'
 89+ );
 90+ }
8191 }
Index: branches/REL1_18/phase3/includes/search/SearchUpdate.php
@@ -62,7 +62,7 @@
6363 "\\1\\2 \\2 \\2\\3", $text ); # Emphasize headings
6464
6565 # Strip external URLs
66 - $uc = "A-Za-z0-9_\\/:.,~%\\-+&;#?!=()@\\xA0-\\xFF";
 66+ $uc = "A-Za-z0-9_\\/:.,~%\\-+&;#?!=()@\\x80-\\xFF";
6767 $protos = "http|https|ftp|mailto|news|gopher";
6868 $pat = "/(^|[^\\[])({$protos}):[{$uc}]+([^{$uc}]|$)/";
6969 $text = preg_replace( $pat, "\\1 \\3", $text );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104635* (bug 32712) Fix for search indexing of pages with certain unicode chars fol...brion00:36, 30 November 2011
r104636Apply the actual fix from r104635. :Pbrion00:37, 30 November 2011

Status & tagging log