[wp-trac] [WordPress Trac] #3698: Matching more tags eats up too
much content
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 27 08:40:05 GMT 2007
#3698: Matching more tags eats up too much content
---------------------+------------------------------------------------------
Reporter: Curioso | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.1.1
Component: General | Version:
Severity: normal | Keywords:
---------------------+------------------------------------------------------
The preg_match('/<!--more(.+?)?-->/', $content, $matches) that is used to
find the more-tag matches content up to the end of a next comment if
present.
This is because while the first '?' indictaes non-greedy match, it still
has to match at least one character, eting up the first '-' of '-->', and
then only terminates on the end of the next comment.
Changing to preg_match('/<!--more(.*?)-->/', $post, $matches) in wordpress
/wp-includes/post.php and wordpress/wp-includes/post-template.php gives
the correct behaviour.
--
Ticket URL: <http://trac.wordpress.org/ticket/3698>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list