Make WordPress Core

Ticket #20338: formatting.php.patch

File formatting.php.patch, 1.0 KB (added by Rynald0s, 9 years ago)

Proposed patch

  • wp-includes/formatting.php

     
    15261526        $title = str_replace('.', '-', $title);
    15271527
    15281528        if ( 'save' == $context ) {
    1529                 // Convert nbsp, ndash and mdash to hyphens
    1530                 $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );
     1529                // Convert curly, nbsp, ndash and mdash to hyphens
     1530                $title = str_replace( array( '\'','%e2%80%99', '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );
    15311531
    15321532                // Strip these characters entirely
    15331533                $title = str_replace( array(
     
    15361536                        // angle quotes
    15371537                        '%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba',
    15381538                        // curly quotes
    1539                         '%e2%80%98', '%e2%80%99', '%e2%80%9c', '%e2%80%9d',
     1539                        '%e2%80%98', '%e2%80%9c', '%e2%80%9d',
    15401540                        '%e2%80%9a', '%e2%80%9b', '%e2%80%9e', '%e2%80%9f',
    15411541                        // copy, reg, deg, hellip and trade
    15421542                        '%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2',