#9765 closed defect (bug) (fixed)
Erroneous balanceTags call? forceBalanceTags should be used?
Reported by: | Denis-de-Bernardy | Owned by: | Denis-de-Bernardy |
---|---|---|---|
Milestone: | 2.8 | Priority: | low |
Severity: | minor | Version: | 2.7 |
Component: | Formatting | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
In get_the_content(), the more_link gets added after the call to balanceTags. Shouldn't it get added before it?
Attachments (2)
Change History (14)
#2
@
16 years ago
- Keywords needs-patch added; has-patch removed
possibly. the only thing I do know is that this is one of those areas in the code that tends to break a lot.
this post, for instance, will almost invariably wreck a front page due to the fact that it's not enforcing balanceTags properly:
<div> foo <!--more--> </div>
shouldn't forceBalanceTags be used, rather than a straight balanceTags call?
#3
@
16 years ago
- Summary changed from erroneous balanceTags call? to Erroneous balanceTags call? forceBalanceTags should be used?
#5
@
16 years ago
imo, yeah. try it on a theme that sets its layout with div tags. you're essentially guaranteed that things will break (i.e sidebars gets knocked down in IE) if you do not opt to use balanceTags in the first place.
#6
@
16 years ago
this case is also tricky (and was the reason I suggested the initial patch:
<div> <p>foo <!--more--></p> </div>
the balanceTags call before the more tag, rather than after, prevents the more link from being appended to the end of the paragraph.
If it is added before it, you could get closing tags AFTER the more_link, which might be undesired. For instance, if you have a formatting div around your teaser, and you forget to close it. balanceTags would extend that div to enclose the more_link.