Closed awsp closed 9 years ago
Yeah! Seems like something to investigate. Let's check.
Thanks for your reply. I found this article might look somewhat similar, hope it helps. http://stackoverflow.com/a/2862421/2167601
To decode, maybe we can use this? http://stackoverflow.com/a/9609450/2167601
But I have no idea how to yet apply to this issue.
Ok, I think I have located where the issue is.
It is actually in the flow-router-ssr
package,
https://github.com/kadirahq/flow-router/blob/ssr/server/route.js#L95
Is it possible to change to the follow?
In that case, it would not encode anything in <head>
including title and meta.
var $ = Cheerio.load(data, {
decodeEntities: false
});
Yeah! I think that's the issue. Could you send me a PR for that project?
thanks!
I was trying to insert some non-English characters into the
title
tag, Characters displayed correctly without errors, but in the source code, they get translated into some unrecognized characters. (Looks like some escaped UTF8 characters)For example,
Gets translated into this
I already put the
meta
tag with charset set toutf-8
, but source code still remains the same see my forked repo: https://github.com/awsp/hello-react-meteor → https://github.com/awsp/hello-react-meteor/blob/master/both/router.jsxI would like it to be exactly the same as the title I input. How would I possibly do it?
PS: The body content being processed by the package
flow-router-ssr
displays non-English characters correctly even in source code. It seems to happen in<head>
tag only.EDIT This issue seems to happen in
meta
tag as well.