Changeset 3996 for branches/2.0/wp-includes/functions-formatting.php
- Timestamp:
- 07/06/2006 02:31:06 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-includes/functions-formatting.php
r3964 r3996 99 99 function wp_specialchars( $text, $quotes = 0 ) { 100 100 // Like htmlspecialchars except don't double-encode HTML entities 101 $text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $text); -101 $text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $text); 102 102 $text = str_replace('<', '<', $text); 103 103 $text = str_replace('>', '>', $text); 104 if ( $quotes ) { 104 if ( 'double' === $quotes ) { 105 $text = str_replace('"', '"', $text); 106 } elseif ( 'single' === $quotes ) { 107 $text = str_replace("'", ''', $text); 108 } elseif ( $quotes ) { 105 109 $text = str_replace('"', '"', $text); 106 110 $text = str_replace("'", ''', $text);
Note: See TracChangeset
for help on using the changeset viewer.