Pass delimiter to preg_quote(). Props Denis-de-Bernardy. see #9955
git-svn-id: http://svn.automattic.com/wordpress/trunk@11634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -80,8 +80,8 @@ function wptexturize($text) {
|
||||
}
|
||||
|
||||
function wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') {
|
||||
$o = preg_quote($opening);
|
||||
$c = preg_quote($closing);
|
||||
$o = preg_quote($opening, '/');
|
||||
$c = preg_quote($closing, '/');
|
||||
foreach($disabled_elements as $element) {
|
||||
if (preg_match('/^'.$o.$element.'\b/', $text)) array_push($stack, $element);
|
||||
if (preg_match('/^'.$o.'\/'.$element.$c.'/', $text)) {
|
||||
|
||||
Reference in New Issue
Block a user