Opened 16 years ago
Closed 16 years ago
#9955 closed defect (bug) (fixed)
Missing preg_quote parameters
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.8.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch commit early |
Focuses: | Cc: |
Description
Found this while investigating a bug in a plugin.
when the second argument is null, preg_quote() assumes the regexp is wrapped around {}. But WP occasionally uses it with / wrappers.
Attachments (1)
Change History (12)
#5
@
16 years ago
I'd really urge you to consider this patch as a bugfix for 2.8.1 (I reported the dupe). Thanks.
#8
@
16 years ago
I went ahead and committed the simple cases for 2.8.1. I want to test the shortcodes.php one a bit more.
#9
@
16 years ago
cool. the one for shortcodes is unneeded if we change add_shortcode() to use:
if ( is_callable($func) ) $shortcode_tags[$tag] = $func;
to something like:
$tag = sanitize_title($tag); if ( is_callable($func) ) $shortcode_tags[$tag] = $func;
#10
@
16 years ago
Also the last two in xmlrpc.php L:3303 and L:3325 seem unneeded as preg_quote()
escapes |
(pipe) by default http://us2.php.net/manual/en/function.preg-quote.php
Note: See
TracTickets for help on using
tickets.
I ignored snoopy, presuming it was obsolete anyway.
Patch needs some testing.