[wp-trac] Re: [WordPress Trac] #6969: Don't apply wptexturize() to
the insides of shortcode tags
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 25 04:52:13 GMT 2008
#6969: Don't apply wptexturize() to the insides of shortcode tags
-------------------------------------+--------------------------------------
Reporter: Viper007Bond | Owner: tellyworth
Type: enhancement | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.5.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+--------------------------------------
Changes (by DD32):
* keywords: needs-patch => has-patch needs-testing
Comment:
>attachment 6969.diff added.
* Needs testing
* skips inards of registered shortcodes
* Splitting regex might need more attention.. not too sure.
Test Code:
{{{
#!php
<?php
$in = '[code lang="php"]
$foo = \'bar\';
[/code]
<code lang="php">$foo = \'bar\'; $foo = \'bar\'</code>';
$GLOBALS['shortcode_tags']['code'] = '';
var_dump(time());
var_dump(wptexturize($in));
}}}
Without the 'code' registered:
{{{
[code lang="php"]
$foo = ‘bar’;
[/code]
<code lang="php">$foo = 'bar'; $foo = 'bar'</code>
}}}
with 'code' registered:
{{{
[code lang="php"]
$foo = 'bar';
[/code]
<code lang="php">$foo = 'bar'; $foo = 'bar'</code>
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/6969#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list