[wp-trac] [WordPress Trac] #15193: get_file_data() regex issue
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 22 14:16:57 UTC 2010
#15193: get_file_data() regex issue
--------------------------+-------------------------------------------------
Reporter: scribu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Plugins | Version:
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
Old description:
> The regex in get_file_data() needs a {{{^}}} at the begining to prevent
> matching something like this:
>
> {{{Some_Class_Description::init();}}}
New description:
I always wondered how the plugin/theme header syntax could be so
permissive.
It turns out the regex is too permissive.
If the description field is missing, for example, it will match any line
at the beginning of a file that contains 'description:' in it, such as:
{{{Some_Class_Description::init();}}}
{{{_e('Edit description:');}}}
--
Comment(by scribu):
I always wondered how
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15193#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list