syntaxhighlighter
syntaxhighlighter copied to clipboard
BugFix for unescaped html in shortcodes gets parsed/styled in visual editor
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:
- Create a post
- In the text tab of tiny mce add a SH shortcode with an h1 in it.
- Save the post
- 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
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.