Ticket #10797: slug-curlyquotes-dashes.patch
File slug-curlyquotes-dashes.patch, 600 bytes (added by , 16 years ago) |
---|
-
.php
old new 680 680 */ 681 681 function sanitize_title_with_dashes($title) { 682 682 $title = strip_tags($title); 683 // strip curly quotes and em/en dashes 684 $title = preg_replace('/\xe2\x80\x93|\xe2\x80\x94|\xe2\x80\x98|\xe2\x80\x99|\xe2\x80\x9c|\xe2\x80\x9d/','',$title); 683 685 // Preserve escaped octets. 684 686 $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); 685 687 // Remove percent signs that are not part of an octet.