I am trying to post some source code on a WordPress.com blog. WordPress actually makes posting syntax-highlighted code quite easy--you wrap the code in a
[sourcecode] block, optionally specify the language with the
lang attribute, and you're good.
I've never had a problem with this before, but I recently found an issue I can't fix. I'm trying to render some source code on the blog with the following.
[sourcecode lang="html"] <iframe src="http://someserver.edu/somescript.php?id=223" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="210px" height="60px"></iframe> [/sourcecode]
When I try to preview the post, the HTML gets stripped from the
[sourcecode] block. When I try to escape the
> characters, the code block is rendered, but the raw text is shown without interpreting the encodings (so you see
< instead of
I'm guessing the original HTML is being stripped as rendering an iframe could lead to security vulnerabilities. But I don't want to render the iframe, I want to render the code behind the iframe, which should not present any security issues. How can I tell the blog to render my source code correctly?