From 758e671652bad925ac40a88d100ca821aed132a8 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 21 Jun 2018 14:53:04 -0400 Subject: [PATCH] French space armoring: Use unicode regex instead of octal escapes Follow up to Id8cdb887182f346acab2d108836ce201626848af Change-Id: I35f7b35746e63a98a115a0dbc9d5869b691c3a9c --- includes/parser/Sanitizer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/parser/Sanitizer.php b/includes/parser/Sanitizer.php index 89a7c96124..21498f89eb 100644 --- a/includes/parser/Sanitizer.php +++ b/includes/parser/Sanitizer.php @@ -1155,9 +1155,9 @@ class Sanitizer { $fixtags = [ # French spaces, last one Guillemet-left # only if there is something before the space - '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => "\\1$space", + '/(.) (?=[?:;!%»])/u' => "\\1$space", # French spaces, Guillemet-right - '/(\\302\\253) /' => "\\1$space", + '/(«) /u' => "\\1$space", ]; return preg_replace( array_keys( $fixtags ), array_values( $fixtags ), $text ); } -- 2.20.1