File: url-escaping.html

package info (click to toggle)
python-html2text 2014.9.25-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 404 kB
  • ctags: 143
  • sloc: python: 1,073; sh: 76; makefile: 14
file content (19 lines) | stat: -rw-r--r-- 1,353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<h1>Markdown-sensible characters processing</h1>

<p>This test checks special characters processing inside URLs: parenthesis and brackets should be escaped to keep markdown image and anchor syntax safe and sound.</p>

<ul>
	<li><a href="http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d(v=vs.110)">Some MSDN link using parenthesis</a></li>
	<li><a href="https://www.google.ru/search?q=[brackets are cool]">Google search result URL with unescaped brackets</a></li>
	<li><a href="https://www.google.ru/search?q='[({})]'">Yet another test for [brackets], {curly braces} and (parenthesis) processing inside the anchor</a></li>
	<li>Use automatic links like <a href="http://example.com/">http://example.com/</a> when the URL is the label</a>
	<li>Exempt <a href="non-absolute_URIs">non-absolute_URIs</a> from automatic link detection</a>
</ul>

<p>And here are images with tricky attribute values:</p>

<img src="http://placehold.it/350x150#(banana)" width="350" height="150" alt="(banana)"><br>
<img src="http://placehold.it/350x150#[banana]" width="350" height="150" alt="[banana]"><br>
<img src="http://placehold.it/350x150#{banana}" width="350" height="150" alt="{banana}"><br>
<img src="http://placehold.it/350x150#([{}])" width="350" height="150" alt="([{}])">
<img src="http://placehold.it/350x150#([{}])" width="350" height="150" alt>