[wp-trac] [WordPress Trac] #6297: Unbalanced tags across more and nextpage tags

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 19 09:55:50 GMT 2008

#6297: Unbalanced tags across more and nextpage tags
 Reporter:  tellyworth  |       Owner:  anonymous
     Type:  defect      |      Status:  new      
 Priority:  normal      |   Milestone:  2.7      
Component:  General     |     Version:           
 Severity:  normal      |    Keywords:  has-patch
 It's easy to produce broken front page markup by including a --nextpage--
 tag that breaks an enclosing bold or italic tag.  There's some code in
 get_the_content that fixes this for --more-- tags, but it doesn't handle
 --nextpage--, and it'd be more efficient to do it at post save time.

 The enclosed patch fixes this by splitting the content into slices at
 those boundaries and separately balancing each slice.  Balancing happens
 in the content_save_pre action.  No filtering is needed on the output side
 for posts saved after this filter.

 It was a bit of a struggle figuring out where to fit this but I think the
 solution is fairly clean.  It includes a new split_nextpage() function
 that can be used instead of ad-hoc regexps for splitting a post into

Ticket URL: <http://trac.wordpress.org/ticket/6297>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list