Make <!--more--> regex non-greedy. Props Curloso and Viper007Bond. fixes #3698
git-svn-id: http://svn.automattic.com/wordpress/trunk@4821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7873820f8c
commit
c08e55fc61
@ -74,7 +74,7 @@ function &get_children($args = '', $output = OBJECT) {
|
|||||||
// get extended entry info (<!--more-->)
|
// get extended entry info (<!--more-->)
|
||||||
function get_extended($post) {
|
function get_extended($post) {
|
||||||
//Match the new style more links
|
//Match the new style more links
|
||||||
if (preg_match('/<!--more(.+?)?-->/', $post, $matches)) {
|
if ( preg_match('/<!--more(.*?)-->/', $post, $matches) ) {
|
||||||
list($main, $extended) = explode($matches[0], $post, 2);
|
list($main, $extended) = explode($matches[0], $post, 2);
|
||||||
} else {
|
} else {
|
||||||
$main = $post;
|
$main = $post;
|
||||||
|
Loading…
Reference in New Issue
Block a user