[wp-trac] [WordPress Trac] #39153: Bug in wp_html_split with unclosed PHP tag (or HTML tag <)

WordPress Trac noreply at wordpress.org
Thu Mar 1 06:03:02 UTC 2018


#39153: Bug in wp_html_split with unclosed PHP tag (or HTML tag <)
-------------------------------------+-------------------------------------
 Reporter:  crosp                    |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Formatting               |     Version:  4.6.1
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch needs-unit-  |     Focuses:  administration,
  tests                              |  template
-------------------------------------+-------------------------------------

Comment (by soulseekah):

 `get_html_split_regex` doesn't have any unit tests, writing some would be
 a great start. Without unit tests touching that regex is a bad, bad, bad
 idea. Probably even worse than trying to parse HTML with regex to begin
 with :)

 Try to compile a list of inputs and expected outputs. Each case should be
 really tiny, demonstrating a specific scenario that regular expression
 goes through.

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


More information about the wp-trac mailing list