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

WordPress Trac noreply at wordpress.org
Fri Oct 31 14:37:49 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 kitchin):

 I guess it's worth looking at my patch (more strpos, less regex)
 https://core.trac.wordpress.org/attachment/ticket/29557/poc_pos_29557.diff
 if this is the algorithm people want:

 `Look for 1. HTML comments, 2. then possible shortcodes, 3. then HTML tags
 (not comments).`

 It proceeds left to right and applies the three steps as it goes. Pretty
 much the same as preg_split() and preg_match_all(), but with a different
 data structure. May need to replace (2) with actual shortcodes instead of
 possible shortcodes.

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


More information about the wp-trac mailing list