Ticket #6297 (closed defect (bug): duplicate)
Unbalanced tags across more and nextpage tags
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Formatting | Version: | 2.5 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
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.
Attachments
Change History
comment:1
tellyworth — 4 years ago
By "No filtering is needed on the output side" I mean no _balance_ filtering of course.
comment:2
tellyworth — 4 years ago
ah, yes, the number of sidebar gets knocked down issues that this might fix...
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.8 to Future Release
broken patch
- Owner anonymous deleted
- Component changed from General to Formatting
see: #9765
- Status changed from new to closed
- Resolution set to duplicate
- Milestone Future Release deleted
fixed in r11398

