Changeset 44566 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 01/11/2019 06:39:55 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r44556 r44566 2479 2479 $tag = ''; 2480 2480 // or close to be safe $tag = '/' . $tag; 2481 } // if stacktop value = tag close value then pop 2482 elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag 2481 2482 // if stacktop value = tag close value then pop 2483 } elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag 2483 2484 $tag = '</' . $tag . '>'; // Close Tag 2484 2485 // Pop … … 2506 2507 if ( '' == $tag ) { 2507 2508 // do nothing 2508 } // ElseIf it presents itself as a self-closing tag... 2509 elseif ( substr( $regex[2], -1 ) == '/' ) { 2509 } elseif ( substr( $regex[2], -1 ) == '/' ) { // ElseIf it presents itself as a self-closing tag... 2510 2510 // ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and 2511 2511 // immediately close it with a closing tag (the tag will encapsulate no text as a result) … … 2513 2513 $regex[2] = trim( substr( $regex[2], 0, -1 ) ) . "></$tag"; 2514 2514 } 2515 } // ElseIf it's a known single-entity tag but it doesn't close itself, do so 2516 elseif ( in_array( $tag, $single_tags ) ) { 2515 } elseif ( in_array( $tag, $single_tags ) ) { // ElseIf it's a known single-entity tag but it doesn't close itself, do so 2517 2516 $regex[2] .= '/'; 2518 } // Else it's not a single-entity tag 2519 else { 2517 } else { // Else it's not a single-entity tag 2520 2518 // If the top of the stack is the same as the tag we want to push, close previous tag 2521 2519 if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags ) && $tagstack[ $stacksize - 1 ] == $tag ) {
Note: See TracChangeset
for help on using the changeset viewer.