WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#34090 closed enhancement (fixed)

Prevent Registration of Invalid Shortcode Names

Reported by: miqrogroove Owned by: 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 6 years ago.
34090.2.diff (2.2 KB) - added by miqrogroove 6 years ago.
Adds unit tests.
34090.3.diff (2.4 KB) - added by miqrogroove 6 years ago.
Style improvement.

Download all attachments as: .zip

Change History (6)

@miqrogroove
6 years ago

@miqrogroove
6 years ago

Adds unit tests.

#1 @miqrogroove
6 years ago

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

@miqrogroove
6 years ago

Style improvement.

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

In 35428:

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

See #34090.

Note: See TracTickets for help on using tickets.