[wp-trac] Re: [WordPress Trac] #6969: Don't apply wptexturize() to
the insides of shortcode tags
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 30 15:38:27 GMT 2009
#6969: Don't apply wptexturize() to the insides of shortcode tags
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: tellyworth
Type: enhancement | Status: new
Priority: normal | Milestone: 2.8
Component: Formatting | Version: 2.5.1
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by mzizka):
Replying to [comment:14 Denis-de-Bernardy]:
> - I'm scratching my head on the extra parameter in the
get_shortcode_regexp(), when using the original one might be just as good.
This is just an optimization. Feel free to ditch it.
> - the start regexp is not the same as the beginning of the real regex
Not sure what you mean exactly.
> - the idea of changing the actual regexp using str_replace() seems a
little weird. why not make it the first element and re-assign things as
needed later on?
I agree, but I could not find another decent way to do it.
>
> also, I foresee potential bugs or tough choices due to the fact that
shortcodes can now be escaped like this:
>
> {{{
> [[shortcode]]
> }}}
>
> because of the escaping regex, the current patch seems potentially
buggy:
>
> {{{
> foo[shortcode]
> "bar"
> [/shortcode]foo
> }}}
We need add test cases for this and fix it.
I continue to think that shortcodes should be treated before wptexturize
and wpautop. In my mind, it makes no sense to do all that formatting work
before shortcodes are treated. It's presumptuous -- why should we presume
shortcode content is meant to be displayed? In fact, it most likely isn't
-- it's meant to be interpreted, transformed, etc. The '''output''' of the
shortcode is what should be formatted.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/6969#comment:16>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list