Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape double quotes of the post title #1602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yous
Copy link
Contributor

@yous yous commented Jul 11, 2014

This is how to produce this problem.

  1. Run rake new_post with a title that has double quotes:

    $ rake new_post
    Enter a title for your post: Post with "double quotes"
    mkdir -p source/_posts
    Creating new post: source/_posts/2014-07-12-post-with-double-quotes.markdown
    

    either

    $ rake new_post["Post with \"double quotes\""]
    mkdir -p source/_posts
    Creating new post: source/_posts/2014-07-12-post-with-double-quotes.markdown
    

    Then the content of 2014-07-12-post-with-double-quotes.markdown:

    ---
    layout: post
    title: "Post with "double quotes""
    date: 2014-07-12 00:00:00 +0000
    comments: true
    categories: 
    ---
  2. Run rake generate:

    $ rake generate
    ## Generating Site with Jekyll
    identical source/stylesheets/screen.css
    Configuration file: /path/to/octopress/_config.yml
                Source: source
           Destination: public
          Generating...
    Error reading file /path/to/octopress/source/_posts/2014-07-12-post-with-double-quotes.markdown: (<unknown>): did not find expected key while parsing a block mapping at line 2 column 1
                        done.
    

@yous
Copy link
Contributor Author

yous commented Nov 4, 2014

Can you also consider this?

@parkr
Copy link
Collaborator

parkr commented Nov 4, 2014

/cc @imathis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants