[wp-trac] [WordPress Trac] #58517: HTML API: Introduce HTML Processor, a higher-level partner to the Tag Processor

WordPress Trac noreply at wordpress.org
Fri Jul 21 22:40:35 UTC 2023


#58517: HTML API: Introduce HTML Processor, a higher-level partner to the Tag
Processor
----------------------------------------+------------------------------
 Reporter:  dmsnell                     |       Owner:  Bernhard Reiter
     Type:  enhancement                 |      Status:  reopened
 Priority:  normal                      |   Milestone:  6.4
Component:  HTML API                    |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-unit-tests 2nd-opinion  |     Focuses:
----------------------------------------+------------------------------
Changes (by azaozz):

 * keywords:  has-patch has-unit-tests => has-unit-tests 2nd-opinion
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:6 Bernhard Reiter]:

 > This patch introduces the //first// of //many// iterations on the
 evolution of the HTML API, the HTML Processor, which is built in order to
 understand HTML structure including nesting, misnesting, and complicated
 semantic rules.

 Sorry but still thinking that building an HTML parser in PHP is not a good
 idea. If it was, there would have been a few around.

 Also WP doesn't need this imho. JavaScript is 1000 times better at
 handling all the tasks that might be needed in manipulating HTML. At the
 end of the day no matter how well a PHP parser is maintained (which is
 quite questionable when it is part of WP and not a separate project) it
 will likely still have many unresolved edge cases and will likely be long
 way behind the latest in HTML standards.

 For comparison doing any of the HTML parsing/manipulation tasks in JS
 would be faster, more secure and a lot easier :) (would generally need few
 lines of code instead of few thousands).

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


More information about the wp-trac mailing list