Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Generator garbles PHP code #424

KAnoshkin opened this Issue · 4 comments

4 participants


Sorry if I'm missing something obvious.

I need to have a contact form on my Octopress site, so I made a php page (with file name extension "php"). All is well except the php code in the generated php file is heavily escaped. Can I somehow configure Jekyll to leave <?php ... ?> blocks as is?

Thanks in advance.


Have you tried using this at the top of your php file?

layout: nil


I tried it and it leaves the PHP code untouched.


Maybe, my setup is wrong, but setting layout to nil only disables templates. I'd like to use a page template, though.

On second thought, it looks like a parser error. Consider the example:

$to = "\"Support Staff\" <>";

The line gets escaped like this:

$to = "\"Support Staff\" <>&#8221;;

The error makes the parser go crazy and it escapes the quote marks "inside out". However, if I omit the angle brackets, everything is fine:

$to = "\"Support Staff\"";

Note that this is actual PHP code supposed to get executed and not just a code quote.


This is by no means a fix, but I ended up working around the issue with the following code:


I'm not seeing this issue. I can process the line you provided, and it goes through without any apparent escaping. Can you still reproduce it?

@parkr parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.