[wp-trac] [WordPress Trac] #28720: Shortcode Escaping Doesn't Work in Most Situations
WordPress Trac
noreply at wordpress.org
Tue Oct 28 20:14:35 UTC 2014
#28720: Shortcode Escaping Doesn't Work in Most Situations
--------------------------+------------------------------
Reporter: miqrogroove | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 3.3
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Comment (by jdgrimes):
Replying to [comment:2 aaroncampbell]:
> '''Escaping only works for registered shortcodes.'''
> I don't think we need to worry about this at all. Shortcodes that aren't
registered aren't shortcodes as far as I'm concerned.
I think what brought me here originally was a scenario in which I wanted
to display shortcode examples. The plugin that provides those shortcodes
wasn't installed, but I was planning to possibly install it in the future.
I wanted to avoid those examples being actually executed by the plugin if
I installed it later. I thought I would escape them, but I couldn't. I
decided to fix the issue by registering fake shortcodes (`add_shortcode(
'shortcode', '__return_empty_string' )`). That way I could use the
shortcode escaping, in case I install that plugin in the future.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28720#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list