Make WordPress Core

Opened 10 years ago

Last modified 5 years ago

#29661 new enhancement

Should Shortcode Attributes Allow HTML Special Characters?

Reported by: miqrogroove's profile miqrogroove Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Shortcodes Keywords: roadmap
Focuses: Cc:

Description

This question has a history of going unanswered.

In the Codex at http://codex.wordpress.org/Shortcode_API there is no mention of using HTML elements or any special characters within shortcode attributes. I added a section about syntax and left this feature as "unofficially allowed."

In the unit tests under the Tests_Shortcode class, there are no tests that mention any HTML special characters inside of shortcodes.

In #28564 we agreed it would make sense to not break HTML elements where they are already being used inside of attributes.

In #29608 and #29658 we are seeing reports of unencoded angle braces and ampersands being used inside of shortcode attributes, which were broken in 4.0.

In #29557 the shortcode HTML filter will likely be removed to fix this and other problems in 4.0.1.

So the issues involve documentation, unit tests, and questions about how this is supposed to work in the visual editor.

Change History (5)

#1 @SergeyBiryukov
10 years ago

  • Keywords dev-feedback added

#2 @miqrogroove
10 years ago

Now see #29810 for a proposal to restrict HTML usage in sensitive areas.

#3 @miqrogroove
10 years ago

If you are looking for information about version 3.9.3 or 4.0.1, you might find it in these updates:

http://codex.wordpress.org/Shortcode_API#HTML
http://codex.wordpress.org/Shortcode_API#Unregistered_Names

#4 @wonderboymusic
10 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Bump

#5 @miqrogroove
9 years ago

  • Keywords roadmap added; dev-feedback needs-patch removed

I'm working on a roadmap that includes this.

Note: See TracTickets for help on using tickets.