Changeset 9179
- Timestamp:
- 10/14/2008 10:58:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r9137 r9179 1671 1671 1672 1672 if ('' == $url) return $url; 1673 $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@ ()\\x80-\\xff]|i', '', $url);1673 $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$*\'()\\x80-\\xff]|i', '', $url); 1674 1674 $strip = array('%0d', '%0a'); 1675 1675 $url = str_replace($strip, '', $url); … … 1683 1683 $url = 'http://' . $url; 1684 1684 1685 // Replace ampersands only when displaying.1686 if ( 'display' == $context ) 1685 // Replace ampersands and single quotes only when displaying. 1686 if ( 'display' == $context ) { 1687 1687 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1688 $url = str_replace( "'", ''', $url ); 1689 } 1688 1690 1689 1691 if ( !is_array($protocols) )
Note: See TracChangeset
for help on using the changeset viewer.