summaryrefslogtreecommitdiffstats
path: root/tests/test_port/fixtures/normalize.md
blob: 4a005089d4a6d13ab687ca49a70ccb763d13b2f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Encode link destination, decode text inside it:

.
<http://example.com/α%CE%B2γ%CE%B4>
.
<p><a href="http://example.com/%CE%B1%CE%B2%CE%B3%CE%B4">http://example.com/αβγδ</a></p>
.

.
[foo](http://example.com/α%CE%B2γ%CE%B4)
.
<p><a href="http://example.com/%CE%B1%CE%B2%CE%B3%CE%B4">foo</a></p>
.


Keep %25 as is because decoding it may break urls, #720
.
<https://www.google.com/search?q=hello%2E%252Ehello>
.
<p><a href="https://www.google.com/search?q=hello%2E%252Ehello">https://www.google.com/search?q=hello.%252Ehello</a></p>
.


Don't encode domains in unknown schemas:

.
[](skype:γγγ)
.
<p><a href="skype:%CE%B3%CE%B3%CE%B3"></a></p>
.


Square brackets are allowed
.
[foo](https://bar]baz.org)
.
<p><a href="https://bar%5Dbaz.org">foo</a></p>
.