Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 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:


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.


Attachments (3)

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

Download all attachments as: .zip

Change History (6)

8 years ago

8 years ago

Adds unit tests.

#1 @miqrogroove
8 years ago

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

8 years ago

Style improvement.

#2 @wonderboymusic
8 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
8 years ago

In 35428:

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

See #34090.

Note: See TracTickets for help on using tickets.