dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a60dcdc
)
French space armoring: Use unicode regex instead of octal escapes
author
C. Scott Ananian
<cscott@cscott.net>
Thu, 21 Jun 2018 18:53:04 +0000
(14:53 -0400)
committer
C. Scott Ananian
<cscott@cscott.net>
Fri, 22 Jun 2018 19:49:01 +0000
(15:49 -0400)
Follow up to Id8cdb887182f346acab2d108836ce201626848af
Change-Id: I35f7b35746e63a98a115a0dbc9d5869b691c3a9c
includes/parser/Sanitizer.php
patch
|
blob
|
history
diff --git
a/includes/parser/Sanitizer.php
b/includes/parser/Sanitizer.php
index
89a7c96
..
21498f8
100644
(file)
--- 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 );
}