Page MenuHomePhabricator

bug27473.patch

Authored By
bzimport
Nov 21 2014, 11:21 PM
Size
748 B
Referenced Files
None
Subscribers
None

bug27473.patch

Index: includes/Linker.php
===================================================================
--- includes/Linker.php (revision 84801)
+++ includes/Linker.php (working copy)
@@ -1518,8 +1518,12 @@
if ( $trail !== '' ) {
$m = array();
if ( preg_match( $regex, $trail, $m ) ) {
- $inside = $m[1];
- $trail = $m[2];
+ // bug 27473: If there are two or more apostrophes in a row in the
+ // linktrail, put them outside the link. This could be handled in the
+ // localized regexes, but is safer to do here.
+ $pos = strpos( $m[1], "''" );
+ $inside = $pos === false ? $m[1] : substr( $m[1], 0, $pos );
+ $trail = $pos === false ? $m[2] : substr( $m[1], $pos ) . $m[2];
}
}
return array( $inside, $trail );

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6869
Default Alt Text
bug27473.patch (748 B)

Event Timeline