I’ve activated the WP-Code-Highlight plugin on my site and want to be able to include code into my entry. However, WP seems to be stripping out certain parts of it. (I’m in the text editor, not the visual editor.) In particular, it seems to dislike the input element as well as the script element.
This works on other, non-Commons WP blogs without a problem:
I tried with that plugin and got the same results – it does seem to strip out certain tags. Can you try the “Syntax Highlighter Evolved” plugin. That worked for me using your same code snippet. I wrapped snippet in [splus]…[/splus] tags. Make sure that you stay in text editor. Hope this helps.
Scott, I tried the SyntaxHighlighter Evolved plugin but it seems to encode all the brackets. See the attached.
Even without a plugin, wrapping code in <pre> tags should make it display as-is but that’s also failing.
Hi Allie – that is odd. On my site, your code snippet renders fine using the SyntaxHighlighter Evolved plugin. Could you try testing on a brand new page. Perhaps you have some encoding tags that are throwing off the display?
Hi Allie – I created a new site, using your theme to see if I could replicate your issue. I also invited you as an admin to the site. I created the page here to test the sytax highlighter evolved, using your code snippet: http://chunktest.commons.gc.cuny.edu/6-2/
It seems to work fine. Can you check out the code tags and see if they match yours?