-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Emoji in front-matter fields should not get converted to Unicode surrogate pairs #577
Comments
@AnthoUCAYA Edit: I was able to reproduce the emoji problem with Hugo. |
Hi @tech4him1 I'm a coworker of @AnthoUCAYA, yes we using Hugo. I think it's from |
The deploy error that you are getting looks like it is directly from Hugo, not from Netlify. For me Hugo seems to have errors with some of the newer Emoji, but not all of them. The CMS does seem to be outputting valid Unicode escape sequences, though, so I'm thinking this is a problem with Hugo itself, you might try making an issue there. If you still think it is a problem with the CMS, can you give me the exact emoji that you are using, and the unicode string that the CMS is outputting? |
Hi, Tell me if you want further tests |
Just a precison, emoji was in a field of the md file but not in the body. |
I don't believe that this is really a bug with the CMS, because it actually is valid Unicode to output It does seem to be something that we could change in the CMS to provide greater interoperability, though, so I am going to leave this issue open for now to that effect. If you think I have misunderstood this problem, though, please let me know. |
@erquhart I'm wondering if we should try to output Emoji characters directly, or with 8-digit escaped Unicode sequences instead of 4-digit ones ( Surrogate Pairs Information: https://mathiasbynens.be/notes/javascript-unicode |
|
@AnthoUCAYA We are working with |
Here is an explanation from Leon Timmermans on the YAML-core mailing list:
|
Thanks for this fix but when I changed the version of netlify-cms to "0.5.0-beta.10" in my package.json, I still have the same problem, it is the right version to use ? |
@AnthoUCAYA No, it hasn't been released yet. It will be in the next beta or version if we are ready ( |
@tech4him1, Ok thanks ! |
I just test version 0.5.0 and it's ok ! |
- Do you want to request a feature or report a bug?
Report a bug
- What is the current behavior?
In CMS, if there is an emoji in md file, after save, emoji are replaced by unicode characters and then Netlify deploy failed
- If the current behavior is a bug, please provide the steps to reproduce.
Go to Admin
Select a page
Add an emoji in a field of your page
Save your page
When Netlify try to deploy site :
1:44:17 PM: ERROR: 2017/09/03 11:44:17 page.go:1309: Error parsing page meta data for mypage.md
1:44:17 PM: ERROR: 2017/09/03 11:44:17 page.go:1310: yaml: line 1: found invalid Unicode character escape code
1:44:17 PM: ERROR: 2017/09/03 11:44:17 page.go:683: yaml: line 1: found invalid Unicode character escape code
1:44:17 PM: Error: Error building site: Errors reading pages: Error:yaml: line 1: found invalid Unicode character escape code for mypage.md
- What is the expected behavior?
Don’t replace emoji and deploy without errors
- Please mention your node.js, and operating system version.
Windows 10 entreprise
The text was updated successfully, but these errors were encountered: