I have a blog that contains source code on some posts. I've discovered that some posts don't accept the source code and I get variously a Server 500 error or a 403 error. I can only assume there is some protection mechanism in Wordpress that sees the source code and rejects it. However, as my hosting doesn't seem to have any logging enabled I cannot see what is wrong with it (assuming, of course, I'm looking in the right place for a log - which I may not be. I've only just migrated my blog and I'm still learning the technical detail about how WordPress works yet.)
I've narrowed it down to two types of source code:
- SQL code
- Razor (the new view engine that arrived with ASP.NET MVC 3)
I've found a work around for getting these posts in to WordPress (Uss the Wordpress RSS Import plugin and copy my post in to an artificial RSS feed file which I import). This is rather unwieldy and I frequently find typos so need to update posts. The importer only ever creates new posts so I can't correct any errors.
Any ideas about how to get posts with source code into Wordpress? I'm using Windows Live Writer to create and publish posts, but as a work around for problematic posts I can always copy and paste the raw HTML then edit directly in the admin pages in Wordpress, but I get the same issue.
Any help much appreciated.