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

WordPress Trac noreply at wordpress.org
Thu Aug 10 22:59:10 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:
----------------------------------------+------------------------------

Comment (by westonruter):

 Replying to [comment:13 azaozz]:
 > Also WP doesn't need this imho. JavaScript is 1000 times better at
 handling all the tasks that might be needed in manipulating HTML. [...]
 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).

 How is JavaScript faster? By doing HTML manipulation via PHP on the
 server, there would be no need to ship any JS, meaning much faster client-
 side performance in all the CWV metrics. And when using page caching, no
 difference in terms of TTFB.

 I definitely think WP does need this, because the server-side alternatives
 are much worse in terms of performance or security/reliability:
 DOMDocument and RegEx.

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


More information about the wp-trac mailing list