WordPress.org

Make WordPress Core

Ticket #1418: wptexturize.patch

File wptexturize.patch, 772 bytes (added by Kafkaesqui, 9 years ago)

Patch to functions-formatting.php for wptexturize doublequote regexp fix.

  • functions-formatting.php

     
    2727                        $curl = preg_replace('/(\d+)"/', '$1″', $curl); 
    2828                        $curl = preg_replace("/(\d+)'/", '$1′', $curl); 
    2929                        $curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl); 
    30                         $curl = preg_replace('/(\s|\A)"(?!\s)/', '$1“$2', $curl); 
     30                        $curl = preg_replace('/(\s\S|\s|\A)"(?!\s)/', '$1“$2', $curl); 
    3131                        $curl = preg_replace('/"(\s|\S|\Z)/', '”$1', $curl); 
    3232                        $curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl); 
    3333                        $curl = preg_replace("/ \(tm\)/i", ' ™', $curl); 
    3434                        $curl = str_replace("''", '”', $curl);