Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#31799 closed defect (bug) (invalid)

Visual Editor can't understand HTML special chars equivalent to WP shortcodes

Reported by: wzislam's profile wzislam Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1.1
Component: TinyMCE Keywords:
Focuses: ui, javascript, administration Cc:

Description

[my-shortcode] is a valid WordPress shortcode. If I'm on Visual Editor mode and paste the shortcode it's now a Shortcode, right. It's ok.

But now I want to say my visitors, hey this is my shortcode: [my-shortcode], you can use it., now when WordPress is rendering the page, it's thinking it's a shortcode, and producing a blank area there. I tried the HTML mode of the editor, and revamped the area with [my-shortcode] updated the page, it's working great, but...

If I switch back to the Visual mode it's forgetting that it's not a shortcode, making it shortcode again, and so so...

Attachments (1)

Screenshot_4.png (4.9 KB) - added by wzislam 10 years ago.
Visual editor and HTML mode of the editor can't differentiate between shortcode brackets and equivalent HTML special characters

Download all attachments as: .zip

Change History (4)

@wzislam
10 years ago

Visual editor and HTML mode of the editor can't differentiate between shortcode brackets and equivalent HTML special characters

#1 @SergeyBiryukov
10 years ago

Try [[my-shortcode]].

#2 @wzislam
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Yes that solved the issue. In fact it worked in both the ways:

In visual editor: [[my-shortcode]]
In text mode: <code>[[my-shortcode]]</code>

Thanks a lot. :)

#3 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.