@@ 902-905 (lines=4) @@ | ||
899 | return $string; |
|
900 | ||
901 | // Account for the previous behaviour of the function when the $quote_style is not an accepted value |
|
902 | if ( empty( $quote_style ) ) |
|
903 | $quote_style = ENT_NOQUOTES; |
|
904 | elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) |
|
905 | $quote_style = ENT_QUOTES; |
|
906 | ||
907 | // Store the site charset as a static to avoid multiple calls to wp_load_alloptions() |
|
908 | if ( ! $charset ) { |
|
@@ 977-981 (lines=5) @@ | ||
974 | } |
|
975 | ||
976 | // Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value |
|
977 | if ( empty( $quote_style ) ) { |
|
978 | $quote_style = ENT_NOQUOTES; |
|
979 | } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) { |
|
980 | $quote_style = ENT_QUOTES; |
|
981 | } |
|
982 | ||
983 | // More complete than get_html_translation_table( HTML_SPECIALCHARS ) |
|
984 | $single = array( ''' => '\'', ''' => '\'' ); |