Unbalanced tags across more and nextpage tags
|Reported by:||tellyworth||Owned by:|
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 pages.
Change History (33)
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.8 to Future Release
- Component changed from General to Formatting
- Owner anonymous deleted
- Milestone Future Release deleted
- Resolution set to duplicate
- Status changed from new to closed
comment:11 @nacin — 3 years ago
- Milestone set to Awaiting Review
- Resolution duplicate deleted
- Status changed from closed to reopened
comment:20 @nacin — 20 months ago
- Keywords commit added; 2nd-opinion removed
- Milestone changed from 3.7 to 3.8