| @@ -16,9 +16,9 @@ | ||
| 16 | 16 | $linkTags = $doc->getElementsByTagName( 'a' ); |
| 17 | 17 | |
| 18 | 18 | foreach ( $linkTags as $tag ) { |
| 19 | 19 | if ( $strip_tags ) { |
| 20 | - $links[] = trim( strip_tags( $tag->ownerDocument->saveXML( $tag ) ) ); | |
| 20 | + $links[] = trim( wp_strip_all_tags( $tag->ownerDocument->saveXML( $tag ) ) ); | |
| 21 | 21 | } else { |
| 22 | 22 | $links[] = $tag->ownerDocument->saveXML( $tag ); |
| 23 | 23 | } |
| 24 | 24 | } |
| @@ -76,9 +76,9 @@ | ||
| 76 | 76 | foreach ( $nodes as $element ) { |
| 77 | 77 | $content = $element->ownerDocument->saveXML( $element ); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - return trim( strip_tags( $content ) ); | |
| 80 | + return trim( wp_strip_all_tags( $content ) ); | |
| 81 | 81 | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | protected function get_tag_content( $html, $search ) { |
| @@ -92,9 +92,9 @@ | ||
| 92 | 92 | $titlepaths[] = $tag->ownerDocument->saveXML( $tag ); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | if ( ! empty( $titlepaths ) ) { |
| 96 | - return trim( strip_tags( $titlepaths[0] ) ); | |
| 96 | + return trim( wp_strip_all_tags( $titlepaths[0] ) ); | |
| 97 | 97 | } else{ |
| 98 | 98 | return ''; |
| 99 | 99 | } |
| 100 | 100 | |
| @@ -111,9 +111,9 @@ | ||
| 111 | 111 | foreach ( $nodes as $element ) { |
| 112 | 112 | $content = $element->getAttribute('data-rating'); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - return trim( strip_tags( $content ) ); | |
| 115 | + return trim( wp_strip_all_tags( $content ) ); | |
| 116 | 116 | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | protected function extract_review_data( $review ){ |
| @@ -143,8 +143,9 @@ | ||
| 143 | 143 | |
| 144 | 144 | $finder = new \DomXPath( $dom ); |
| 145 | 145 | $nodes = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' review ')]"); |
| 146 | 146 | |
| 147 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context. | |
| 147 | 148 | $conditioned_filter = apply_filters( 'nx_wp_reviews_rating_condition', 3 ); |
| 148 | 149 | |
| 149 | 150 | foreach ( $nodes as $node ) { |
| 150 | 151 | $raw_review = $node->ownerDocument->saveXML( $node ); |