[wp-trac] [WordPress Trac] #20278: Fix for TestPostFiltering::test_post_content_unbalanced_* tests
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 21 22:41:28 UTC 2012
#20278: Fix for TestPostFiltering::test_post_content_unbalanced_* tests
--------------------------+-----------------------------
Reporter: devesine | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
The following tests do not currently pass:
TestPostFiltering::test_post_content_unbalanced_more
TestPostFiltering::test_post_content_unbalanced_nextpage
TestPostFiltering::test_post_content_unbalanced_more_nextpage
TestPostFiltering::test_post_content_unbalanced_nextpage_more
due to balanceTags simply running force_balance_tags against the text
passed in to it from various _save_pre hooks.
The tests expect that balanceTags should balance tags separately on either
side of <!--more--> and <!--nextpage--> quicktags, rather than in one
lump.
The attached patch splits up the text (using a regex patterned after the
regexes used to split out quicktags in other areas such as
get_the_content()) runs force_balance_tags against each part, and glues
them back together.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20278>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list