Make WordPress Core

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#23517 closed defect (bug) (invalid)

Shortcode: if last parameter ends with '/', it is mistaken for self-closing shortcode closure

Reported by: sergem Owned by:
Priority: normal Milestone:
Component: Shortcodes Version: 3.5.1
Severity: normal Keywords:
Cc: Focuses:

Description (last modified by SergeyBiryukov)

In example:

[shortcode urlparam=http://somesite/path/]content text[/shortcode]
"[shortcode urlparam=http://somesite/path/]" 

is interpreted as self closing:

[shortcode/] with urlparam="http://somesite/path"

All examples in ​http://codex.wordpress.org/Shortcode_API include whitespace before '/]'

This prevents implementation of bbcode parser for people to paste flickr photo snippets.

Attachments (1)

file.patch​ (814 bytes ) - added by sergem 14 years ago.
patch

Download all attachments as: .zip

Change History (9)

#1 follow-up: @kovshenin
14 years ago

Similar to HTML, the [shortcode/] syntax is a self-closing shortcode, and there's no easy way to distinguish that from the argument value, unless you enclose that in quotes, which should work:

[shortcode urlparam="http://somesite/path/"]

Suggesting to close as invalid.

#2 @sergem
14 years ago

  • Keywords has-patch added

#3 @sergem
14 years ago

lookbehind non-whitespace does it nicely!

#4 @SergeyBiryukov
14 years ago

  • Description modified (diff)

#5 @SergeyBiryukov
14 years ago

Please provide an svn diff if possible, rather than a standard diff.

#6 @miqrogroove
12 years ago

  • Keywords has-patch removed

Patch is not usable because it would alter the attribute value of every shortcode written in the form of

[mycode attr=value/]

#7 in reply to: ↑ 1 @miqrogroove
12 years ago

  • Resolution → invalid
  • Status new → closed

Replying to kovshenin:

Suggesting to close as invalid.

Agreed. There is no bug described in this ticket.

#8 @DrewAPicture
12 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.