Support for complex nested shorttags
|Reported by:||pepijndevos||Owned by:|
The documentations is misleading on this point.
It is said that you can have nested shorttags by calling do_shorttag on the content.
However the shorttag parser isn't really a parser, it's just a non-greedy regex of some sort. It does work for simple tags without content, but when we define a [div] tag, look at the following code:
[div] [div] test1 [/div] [div] test2 [/div] [/div]
<div> <div>(tag without content) test1 </div> <div> test2 [/div](not parsed at all) </div>
I think that if you want to stop people from writing their own parsers you should include some decent parser with Wordpress, not a regex I could do myself.
Workaround: Assign div2 and probably div3 and 4 to the same function, and use these for the nested tags. <--- very ugly!
Change History (18)
- Component changed from Editor to Shortcodes
- Keywords needs-patch added
- Milestone changed from Unassigned to Future Release
- Version set to 2.9