Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#34090 closed enhancement (fixed)

Prevent Registration of Invalid Shortcode Names

Reported by: miqrogroove's profile miqrogroove Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: high
Severity: normal Version:
Component: Shortcodes Keywords: roadmap has-patch
Focuses: Cc:

Description

All versions of the Shortcode API have allowed registration of any shortcode name, even though certain characters would be impossible to use inside of a shortcode.

In addition to specifying which shortcode delimiters are reserved, we also need to prevent any use of HTML special characters in shortcode names.

See https://make.wordpress.org/core/2015/09/29/shortcode-roadmap-draft-two/

Attachments (3)

34090.diff (553 bytes) - added by miqrogroove 9 years ago.
34090.2.diff (2.2 KB) - added by miqrogroove 9 years ago.
Adds unit tests.
34090.3.diff (2.4 KB) - added by miqrogroove 9 years ago.
Style improvement.

Download all attachments as: .zip

Change History (6)

@miqrogroove
9 years ago

@miqrogroove
9 years ago

Adds unit tests.

#1 @miqrogroove
9 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.4

@miqrogroove
9 years ago

Style improvement.

#2 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34745:

Shortcodes: prevent registration of invalid shortcode names.

Adds unit tests.

Props miqrogroove.
Fixes #34090.

#3 @pento
9 years ago

In 35428:

Shortcodes: Tweak the error messages added in [34745].

See #34090.

Note: See TracTickets for help on using tickets.