Skip to content

BugFix for unescaped html in shortcodes gets parsed/styled in visual editor #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Jun 7, 2013

Description:

SH passes unescaped html to the tiny mce editor. The tags are getting
parsed and styled by the user-agent in some instances. The reset
specifies that children of pre should inherit some style from pre.

Steps to reproduce:

  1. Create a post
  2. In the text tab of tiny mce add a SH shortcode with an h1 in it.
  3. Save the post
  4. After page reload, switch to the visual tab

Example short code
[html]<h1>This is an h1</h1>[html]

Expected output:

The user should be able to switch tiny mce modes (text/visual) and the content of the shortcode will consistently be styled with pre in visual mode

Actual Output:

Since SH passes unescaped html to the editor, the html gets parsed by the browser applying user-agent styles and theme editor styles to the h1 tag

Tested with: WordPress 3.6-beta3-24430

SH passes unescaped html to the tiny mce editor. The tags are getting
parsed and styled by the user-agent in some instances. The reset
specifies that children of pre should inherit style.
@enewton
Copy link

enewton commented Jan 17, 2014

I think I have the same/similar problem as this. I'm using Markdown on Save Improved & Typewriter - Markdown for WordPress
I'm not sure where the problem is, or whether it's just a plugin compatibility problem.
What is the recommended editor? and general set of plugins?

An example of my broken page can be found here:
http://matlabrecipes.com/matlab-linear-indices/

You'll see my first snippet of code has spurious <p> tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant