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: |
|
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 < breaks WP" /></a> Caption with special character lower than < breaks WP (inserted manually)[/caption]
Using the UI it is escaped correctly with <
You can see a testcase here: http://testserver.torstenlandsiedel.de/2016/04/testcase-caption/
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
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.