Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7336
bug27473.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:21 PM
2014-11-21 23:21:42 (UTC+0)
Size
748 B
Referenced Files
None
Subscribers
None
bug27473.patch
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6869
Default Alt Text
bug27473.patch (748 B)
Attached To
Mode
T29473: Apostrophe in linktrail breaks bolded links
Attached
Detach File
Event Timeline
Log In to Comment