[wp-trac] Re: [WordPress Trac] #4820: Regex fix for $pagelinkedfrom
(xmlrpc.php)
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 28 05:42:28 GMT 2007
#4820: Regex fix for $pagelinkedfrom (xmlrpc.php)
-----------------------+----------------------------------------------------
Reporter: tenpura | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3
Component: XML-RPC | Version: 2.3
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------+----------------------------------------------------
Changes (by tenpura):
* keywords: => has-patch
Comment:
I found another one to fix. Please see the attachment.
> Is there a specific example of where the current code doesn't work as
expected?
Yes. The current code contains a misuse of character class (Square
brackets).
Example:
{{{
$pagelinkedfrom = '&a=1&m=2&p=3&ok=4&';
$pagelinkedfrom = preg_replace('#&([^amp\;])#is', '&$1',
$pagelinkedfrom);
echo $pagelinkedfrom; // result is &a=1&m=2&p=3&ok=4&
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/4820#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list