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

Hugo fails when parsing some Unicode escape sequences in YAML front matter #3857

Closed
tech4him1 opened this issue Sep 3, 2017 · 3 comments
Closed
Labels

Comments

@tech4him1
Copy link

If a post contains some Unicode escape sequences in YAML front-matter, like this:

description: "\uD83D\uDC68"

which is the code form the Emoji 👨, Hugo errors out while processing that post:

Started building sites ...
ERROR 2017/09/03 14:09:24 failed to parse page metadata for "post\\this-post.md": yaml: line 3: found invalid Unicode character escape code
Error: Error building site: Errors reading pages: Error: failed to parse page metadata for "post\\this-post.md": yaml: line 3: found invalid Unicode character escape code for this-post.md

Am I doing something wrong here, or is this a bug?

@tech4him1 tech4him1 changed the title Hugo fails when parsing some Unicode escape charecters in YAML front matter Hugo fails when parsing some Unicode escape sequences in YAML front matter Sep 3, 2017
@bep
Copy link
Member

bep commented Sep 3, 2017

I very much doubt it is a bug, but if so, you would have to raise an issue here:

https://github.com/go-yaml/yaml

As to emojis, see https://gohugo.io/functions/emojify/

@bep bep closed this as completed Sep 3, 2017
@tech4him1
Copy link
Author

@bep Thanks for the quick reply, I really doubted it too. I think I finally found the issue: go-yaml/yaml#279.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants