* (bug 32712) Fix for search indexing of pages with certain unicode chars following URL
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Nov 2011 00:36:34 +0000 (00:36 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Nov 2011 00:36:34 +0000 (00:36 +0000)
commitf79d1d3ffb9196dc920655d6cfb9a80929391a8b
treea3c0262102b1ac5c205ef4fb5c75bca006a449ce
parent9478a098ab4b54bd0fe123f514dc968016307537
* (bug 32712) Fix for search indexing of pages with certain unicode chars following URL

A regex in SearchUpdate was built for ancient pure ISO 8859-1 and looked for \xa0-\xff bytes -- this caused the regex to cut off partway through if there was a char containing a byte in the \x80-\x9f range.
Fixed regex to pass \x80-\xff instead.

Added a test case to SearchUpdateTest which checks for this case (example text run through the update squash algo, then run through preg_replace with a /u param to make sure it gets treated as UTF-8 and checking whether it breaks.)
tests/phpunit/includes/search/SearchUpdateTest.php