WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#32172 closed enhancement (duplicate)

Positional shortcodes cannot be single quoted

Reported by: WayneAllen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Shortcodes Keywords: has-patch
Focuses: Cc:

Description

The following shortcode results in a single element in the $atts array: [test "some long text"]
array(0 => "some long text")

The following shortcode results in 3 elements in the $attrs array: [test 'some long text']
array(0 => "'some", 1 => "long", 2 => "text'")

Attachments (1)

32172.patch (2.3 KB) - added by tyxla 5 years ago.
Adding support for single quote characters for positional shortcode attributes. Adding unit tests for attributes wrapped with single quotes.

Download all attachments as: .zip

Change History (5)

#1 @tyxla
5 years ago

  • Keywords needs-patch needs-unit-tests added

Related: #5914

This bug has been there since the introduction of positional shortcode attributes in [6911].

@tyxla
5 years ago

Adding support for single quote characters for positional shortcode attributes. Adding unit tests for attributes wrapped with single quotes.

#2 @tyxla
5 years ago

  • Keywords has-patch added; needs-patch needs-unit-tests removed

#3 @miqrogroove
5 years ago

  • Type changed from defect (bug) to feature request
  • Version 4.2.1 deleted

This is not a bug.

#4 @swissspidy
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Type changed from feature request to enhancement

Duplicate of #37304.

Note: See TracTickets for help on using tickets.