Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#33593 new feature request

Make shortcodes case insensitive

Reported by: archon810's profile archon810 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Shortcodes Keywords: 2nd-opinion
Focuses: Cc:

Description

Right now, shortcodes are case sensitive. For example, [thanks]Guy Incognito[/thanks] works but [Thanks]Guy Incognito[/Thanks] doesn't.

For me, as a developer, it makes sense. For my writers, who have complained about [Thanks] and the like not working, it doesn't.

http://wordpress.stackexchange.com/questions/102375/are-shortcodes-case-sensitive shows that shortcodes are indeed case sensitive. But why? Why wouldn't the regex have the i modifier and become insensitive for the shortcode name itself (I'm not talking about shortcode parameters, just the name)?

Change History (3)

#1 @miqrogroove
9 years ago

  • Type changed from defect (bug) to feature request

#2 @miqrogroove
9 years ago

The roadmap concepts currently in discussion will move us away from parsing shortcode names with regex. A possible consideration is to force inputs to lower case instead. There could be other concerns about namespace conflicts, but this feature is a possibility.

#3 @swissspidy
8 years ago

  • Keywords 2nd-opinion added

This would probably lead to unexpected changes in some cases where there are two shortcodes with the same tag and one is lowercase but one isn't.

IMHO shortcodes should be all lowercase and doing_it_wrong() should be called in other cases.

Note: See TracTickets for help on using tickets.