@@ -89,7 +89,7 @@ private function compile(): void {
8989
9090 $ this ->compiled = array ();
9191 $ this ->edits = array ();
92- $ this ->placeholder_names = array ();
92+ $ this ->placeholder_names = array ();
9393
9494 $ processor = ( new class ( '' , WP_HTML_Processor::CONSTRUCTOR_UNLOCK_CODE ) extends WP_HTML_Processor {
9595 public function get_html (): string {
@@ -164,7 +164,7 @@ public function get_tag_attributes(): array {
164164 $ this ->compiled [ $ placeholder ]['offsets ' ][] = array ( $ start , $ length );
165165
166166 // New: append placeholder edit and register name.
167- $ this ->edits [] = array (
167+ $ this ->edits [] = array (
168168 'start ' => $ start ,
169169 'length ' => $ length ,
170170 'placeholder ' => $ placeholder ,
@@ -212,13 +212,16 @@ public function get_tag_attributes(): array {
212212 $ seg_length = $ match_start - $ last_offset ;
213213 $ original = substr ( $ html , $ last_offset , $ seg_length );
214214 $ decoded = WP_HTML_Decoder::decode_attribute ( $ original );
215- $ escaped = strtr ( $ decoded , array (
216- '& ' => '& ' ,
217- '< ' => '< ' ,
218- '> ' => '> ' ,
219- "' " => '' ' ,
220- '" ' => '" ' ,
221- ) );
215+ $ escaped = strtr (
216+ $ decoded ,
217+ array (
218+ '& ' => '& ' ,
219+ '< ' => '< ' ,
220+ '> ' => '> ' ,
221+ "' " => '' ' ,
222+ '" ' => '" ' ,
223+ )
224+ );
222225 // Only add edit if escaping actually changes the text.
223226 if ( $ escaped !== $ original ) {
224227 $ this ->edits [] = array (
@@ -242,7 +245,7 @@ public function get_tag_attributes(): array {
242245 $ this ->compiled [ $ placeholder ]['offsets ' ][] = array ( $ match_start , $ match_length );
243246
244247 // New: append placeholder edit and register name.
245- $ this ->edits [] = array (
248+ $ this ->edits [] = array (
246249 'start ' => $ match_start ,
247250 'length ' => $ match_length ,
248251 'placeholder ' => $ placeholder ,
@@ -259,13 +262,16 @@ public function get_tag_attributes(): array {
259262 $ seg_length = $ end - $ last_offset ;
260263 $ original = substr ( $ html , $ last_offset , $ seg_length );
261264 $ decoded = WP_HTML_Decoder::decode_attribute ( $ original );
262- $ escaped = strtr ( $ decoded , array (
263- '& ' => '& ' ,
264- '< ' => '< ' ,
265- '> ' => '> ' ,
266- "' " => '' ' ,
267- '" ' => '" ' ,
268- ) );
265+ $ escaped = strtr (
266+ $ decoded ,
267+ array (
268+ '& ' => '& ' ,
269+ '< ' => '< ' ,
270+ '> ' => '> ' ,
271+ "' " => '' ' ,
272+ '" ' => '" ' ,
273+ )
274+ );
269275 // Only add edit if escaping actually changes the text.
270276 if ( $ escaped !== $ original ) {
271277 $ this ->edits [] = array (
@@ -372,7 +378,7 @@ public function bind( array $replacements ): static {
372378 }
373379 }
374380
375- $ new = new static ( $ this ->template_string , $ replacements );
381+ $ new = new static ( $ this ->template_string , $ replacements );
376382 $ new ->compiled = $ this ->compiled ;
377383 $ new ->edits = $ this ->edits ;
378384 $ new ->placeholder_names = $ this ->placeholder_names ;
0 commit comments