[wp-trac] [WordPress Trac] #10248: force_balance_tags breaks <!--more-->

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 24 14:56:16 UTC 2009


#10248: force_balance_tags breaks <!--more-->
-----------------------------------------------+----------------------------
 Reporter:  McShelby                           |        Type:  defect (bug)
   Status:  new                                |    Priority:  normal      
Milestone:  2.9.1                              |   Component:  Template    
  Version:  2.8                                |    Severity:  normal      
 Keywords:  has-patch close balance tags more  |  
-----------------------------------------------+----------------------------
Changes (by McShelby):

  * keywords:  close balance tags more => has-patch close balance tags more
  * milestone:  3.0 => 2.9.1


Comment:

 Summary
 =======
 - We want to make sure, that the excerpt is balanced correctly. Therefore
 we are running the balance_code on it unconditionally. I've had time to
 rethink my previous comments and now think especially
 http://core.trac.wordpress.org/ticket/9765#comment:6 is worth doing a
 balance_code here.
 - We have a plugin (here Exec-PHP) that needs to alter the content before
 anyone else have done it. Particularly Exec-PHP will mess up if WordPress
 had balanced the PHP code.

 Options
 =======
 - Don't fix: Then plugin execution will fail if only the excerpt is
 processed to the user (e.g. on the front page of a blog). -> Unpreferable
 (to me)
 - Revert #9765: Then the excerpt may generate ill-formatted HTML. ->
 Unpreferable (to the public)
 - Fix the Exec-PHP plugin: Because the processed PHP code may contain
 comparison operators that will be processed as unbalanced HTML tags, some
 further escaping of the PHP code could be done by the Exec-PHP plugin
 before saving the code and reverting them before displaying the content.
 The plugin was explicitly designed not to parse any PHP code because it's
 to costly, errorprone and unnecessary. -> Unpreferable (to me)
 - Fix the balace_code: This alone will not fix the issue because PHP
 operators will still be handled wrong. -> Will not work
 - Add a new filter: We could add a new filter that is executed before the
 content is altered by WordPress. That filter would be benefitial to other
 plugins too. I've added this suggestion as a patch to this ticket.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10248#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list