[wp-trac] Re: [WordPress Trac] #3698: Matching more tags eats up too much content

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 19 21:27:39 GMT 2007


#3698: Matching more tags eats up too much content
---------------------+------------------------------------------------------
 Reporter:  Curioso  |        Owner:  anonymous
     Type:  defect   |       Status:  reopened 
 Priority:  normal   |    Milestone:  2.1.1    
Component:  General  |      Version:  2.1      
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by McShelby):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 I am just wondering about the regex in general and the patch in specific.

 Why is the regex designed to match any arbitrary character after the
 "more" keyword? From my point of view this only makes sense if WP wants to
 support XHTML styled "more" tags like <!--more/-->. At the moment I can
 put a HTML comment into the post like <!--more information below--> which
 will accidently be treated as a "more" tag.

 To avoid the above and to support XHTML styled "more" tags, the regex
 should be changed to '<!--more\s*(?:\/)?-->/'

 Also post.patch was only applied to post.php and not to post-template.php.
 Was this as intended?

 Patch for the proposed changes to post.php and post-template.php is
 attached.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3698#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list