[wp-trac] [WordPress Trac] #14481: Shortcode Enhancements
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 8 19:36:05 UTC 2010
#14481: Shortcode Enhancements
-------------------------+--------------------------------------------------
Reporter: deadowl | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 3.0
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Comment(by deadowl):
I updated the content_tags.php file to a version that factors out the
global variable, as well as the last remaining look-around assertion.
The method employed will prevent certain patterns from being parsed, but
they wouldn't likely be widespread. What happens is that it will parse
something that looks like a valid shortcode, ignoring the name, and then
if the name doesn't have a hook, it will just output the original
expression.
"so if [this content tag] is invalid" would then translate to "so if is
[this content tag] is invalid" given the tag "this" not having a hook.
The implementation prevents certain syntax variations.
ex 1.
[invalid-tag hello="[valid-tag/]"], the inline-expression, [valid-tag/],
is not interpreted
ex 2.
[invalid-tag]], the escaped right-square-bracket is not interpreted
Another option would be to swallow tags that don't have a callback. My
main concern here is keeping the syntax intuitive. Any feedback?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14481#comment:22>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list