Make WordPress Core

Opened 12 years ago

Last modified 7 years ago

#29661 new enhancement

Should Shortcode Attributes Allow HTML Special Characters?

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

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
12 years ago

  • Keywords dev-feedback added

#2 @miqrogroove
12 years ago

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

#3 @miqrogroove
12 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
12 years ago

  • Keywords needs-patch added
  • Milestone Awaiting ReviewFuture Release

Bump

#5 @miqrogroove
11 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.