[wp-trac] [WordPress Trac] #24001: \s in the regexp destroys some UTF-8 characters in pingback_ping()
WordPress Trac
noreply at wordpress.org
Tue Apr 9 21:42:57 UTC 2013
#24001: \s in the regexp destroys some UTF-8 characters in pingback_ping()
------------------------------+--------------------
Reporter: tenpura | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: XML-RPC | Version: 1.5.2
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+--------------------
Comment (by azaozz):
Yeah, we shouldn't be using `\s` in regex that filters user submitted or
translatable text as it matches bytes that are part of some multibyte
(UTF-8, others) chars. The `[\r\n\t ]` replacement seems to work properly.
In theory best would be to use the `u`
[http://php.net/manual/en/reference.pcre.pattern.modifiers.php modifier],
however that leaves installs with charset other than UTF-8 out in a "grey
area".
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24001#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list