-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
'Url' or 'href' should be also encoded when meeting non-normative characters #1450
Comments
Url
or mailto:
should only allow Latian CharactersUrl
or href
should only allow Latian Characters
looks like GitHub renders it the same way marked does: |
Where does it say that links should only include latin characters? |
@UziTech:What makes me feel puzzled is that for 'mailto', “。”and “我” are seperated from the English characters, compared with this, the url or href link(such as http……), you now can see “我” and “。” are a part of them. It should be the same as what we see in "mailto". So I guess, whether url, href or mailto should only allow English characters (or lartain characters)? |
according to the commonmark spec:
and spec for email
|
also according to gfm spec:
|
Should we also use I mean: should be converted to:"http://www.baidu.com/%E6%88%91" And take this: should be converted to: What do you think of this? PS:You can compare the demo example—— Unencoded Characters. If you directly open this page and move your mouse onto the link (starting with 'http'), you'll find that the Chinese characters aren't encoded yet. But if you switch to 'Html Rendering Preview', it seems your href or url are fully encoded. 【Right】 |
Url
or href
should only allow Latian Characters
My mistake, I didn't make it clear to you, now I've changed my topic to this: 'Url' or 'href' should be also encoded when meeting non-normative characters. :) |
According to the spec only whitespace, control characters, <, and > need to be percent encoding. |
Interesting question, feeling curious.... I'm looking at the RFC Resource, it says……
RFC 1738. So which is the standard document for the URL or Href? |
We do run urls through encodeURI. It looks like chrome automatically decodes the url when displaying it even though it is encoded |
Really?I'll check it with other browsers such as IE or Edge……This is strange.... |
Ah ha……Thanks! |
Take this demo:
Mixed with Non-Lartin Characters in Url.
It seems for 'mailto:……', it's right that we don't allow any characters except Lartins (26 English characters), however, this is wrong in Url or href.
Ref:nodejs/nodejs.org#1612
The text was updated successfully, but these errors were encountered: