Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#36699 closed defect (bug) (wontfix)

Caption (maybe shortcodes in general) break when "lower than" character is inserted manually

Reported by: zodiac1978's profile zodiac1978 Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.5
Component: Shortcodes Keywords:
Focuses: Cc:

Description

The caption shortcode (maybe shortcodes with start and end tags in general) break when "lower than" character is inserted manually:

[caption]<a href=""><img class="" src="" alt="Caption with special character lower than &lt; breaks WP" /></a> Caption with special character lower than < breaks WP (inserted manually)[/caption]

Using the UI it is escaped correctly with &lt;

You can see a testcase here: http://testserver.torstenlandsiedel.de/2016/04/testcase-caption/

Attachments (1)

Bildschirmfoto 2016-04-28 um 12.20.24.png (176.2 KB) - added by zodiac1978 10 years ago.

Download all attachments as: .zip

Change History (3)

#1 @zodiac1978
10 years ago

  • Severity changed from normal to minor
  • Version changed from trunk to 4.5

#2 @aaroncampbell
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This isn't a bug. The less than character needs to be encoded because shortcodes are not parsed if they're inside an HTML tag. The un-encoded less than is really the opening of an HTML tag that you just never close, causing the closing caption shortcode tag to not be seen.

Note: See TracTickets for help on using tickets.