| @@ -29,9 +29,8 @@ | ||
| 29 | 29 | 'a', |
| 30 | 30 | 'article', |
| 31 | 31 | 'aside', |
| 32 | 32 | 'button', |
| 33 | - 'form', | |
| 34 | 33 | 'div', |
| 35 | 34 | 'footer', |
| 36 | 35 | 'h1', |
| 37 | 36 | 'h2', |
| @@ -971,19 +970,6 @@ | ||
| 971 | 970 | } |
| 972 | 971 | |
| 973 | 972 | public static function encode_string( string $decoded_string ): string { |
| 974 | 973 | return base64_encode( $decoded_string ); |
| 975 | - } | |
| 976 | - | |
| 977 | - public static function html_to_plain_text( string $html ): string { | |
| 978 | - if ( empty( $html ) ) { | |
| 979 | - return ''; | |
| 980 | - } | |
| 981 | - | |
| 982 | - $text = preg_replace( '#<br\s*/?\s*>#i', ' ', $html ); | |
| 983 | - $text = preg_replace( '#</?[a-z][^>]*>#i', ' ', $text ); | |
| 984 | - $text = html_entity_decode( $text, ENT_QUOTES, 'UTF-8' ); | |
| 985 | - $text = str_replace( "\xE2\x80\x8B", '', $text ); | |
| 986 | - | |
| 987 | - return trim( preg_replace( '/\s+/', ' ', $text ) ); | |
| 988 | 974 | } |
| 989 | 975 | } |