[wp-trac] [WordPress Trac] #29557: PHP ≤ 5.4.8 Crashes on '[' Character in Posts

WordPress Trac noreply at wordpress.org
Tue Nov 4 23:05:18 UTC 2014


#29557: PHP ≤ 5.4.8 Crashes on '[' Character in Posts
------------------------------------------------------+--------------------
 Reporter:  MrBobDobolina                             |       Owner:
     Type:  defect (bug)                              |      Status:  new
 Priority:  highest omg bbq                           |   Milestone:  4.0.1
Component:  Formatting                                |     Version:  4.0
 Severity:  blocker                                   |  Resolution:
 Keywords:  wptexturize has-patch commit fixed-major  |     Focuses:
------------------------------------------------------+--------------------

Comment (by bobbingwide):

 I'm following this with interest, albeit from a bit of a distance, since I
 believe I may have a slightly different set of requirements to the average
 user.

 My requirements are:

 1. Allow HTML in parameters in shortcodes e.g. [bw_blockquote text="A
 <b>bold</b> statement"]
 2. Allow stuff that ''might look like HTML'' in parameters in shortcodes.
 See #29608
 3. Allow shortcodes to pull in other content which may also contain
 shortcodes
 4. One day, allow shortcodes in parameters

 In order to achieve the first three I've had to resequence the filter
 hooks for 'the_content'.

 My current solution, when I need to do the above is:
 {{{
   remove_filter( 'the_content', 'wpautop' );
   remove_filter( 'the_content', 'shortcode_unautop' );
   if ( $autop ) {
     add_filter( 'the_content', 'bw_wpautop', 99);
   } else {
     remove_filter( 'the_content', 'bw_wpautop', 99 );
   }
 }}}
 where bw_wpautop which can be toggled on or off as required.

 My preference for texturize and wpautop would be to leave them right to
 the end, or not run them at all.

 I'm just wondering if anyone has tried a similar approach and seen what
 sort of results you get from the unit test cases.

 BTW. I've currently got 199 shortcodes in my development environment (
 $shortcode_tags).
 Slightly more than the 7 shortcodes provided by core :-)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29557#comment:113>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list