Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#23786 closed enhancement (fixed)

Shortcodes working inside HTML and PHP comments

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

Description

I think that shortcodes should not work inside html or php comments. The following comment inserted in the Wordpress editor shows the images gallery, breaks the layout of the theme and shows after the gallery these characters -->

<!--[gallery ids="4585,4515,4587"] -->

If I use do_shortcode() in a plugin with a shortcode inside a php comments, it's the same as it is with html comments.

Change History (7)

#1 @javitxu123
13 years ago

  • Summary changed from Shortcodes inside comments to Shortcodes working inside comments

#2 @SergeyBiryukov
13 years ago

  • Summary changed from Shortcodes working inside comments to Shortcodes working inside HTML and PHP comments

#3 follow-up: @mark-k
13 years ago

The gallery shortcode breaks html comments because it inserts its on comments and html doesn't support nested comments.

@SergeyBiryukov, since no on is likely to make any changes in shortcodes for 3.6 I suggest to split this ticket into two, this as an enhancement for future release and a new one for removing the comment from the html generate by the gallery shortcode for 3.6

#4 @toscho
13 years ago

  • Cc info@… added

#5 in reply to: ↑ 3 @SergeyBiryukov
13 years ago

Replying to mark-k:

I suggest to split this ticket into two, this as an enhancement for future release and a new one for removing the comment from the html generate by the gallery shortcode for 3.6

Makes sense, feel free to create the ticket.

#6 @mark-k
13 years ago

related #23787

#7 @miqrogroove
10 years ago

  • Milestone changed from Awaiting Review to 4.2.3
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.