def get_context_data(self, **kwargs):
- kwargs.setdefault('view', self)
+ kwargs.setdefault('view', self)
if self.extra_context is not None:
kwargs.update(self.extra_context)
return kwargs
@@ -28,7 +28,7 @@ URL PARAMETERS IN THE TEMPLATE
def get_context_data(self, **kwargs):
kwargs = super().get_context_data(**kwargs)
- kwargs['page_title'] = "Documentation"
+ kwargs['page_title'] = "Documentation"
return kwargs
diff --git a/test/tm-cases/fenced_code_blocks_issue426.tags b/test/tm-cases/fenced_code_blocks_issue426.tags
index 2c03fb5d..7fa5d6a0 100644
--- a/test/tm-cases/fenced_code_blocks_issue426.tags
+++ b/test/tm-cases/fenced_code_blocks_issue426.tags
@@ -1 +1 @@
-extra fenced-code-blocks pygments
+extra fenced-code-blocks pygments pygments>=2.21
diff --git a/test/tm-cases/fenced_code_blocks_leading_lang_space.html b/test/tm-cases/fenced_code_blocks_leading_lang_space.html
index f5815e5e..645de3db 100644
--- a/test/tm-cases/fenced_code_blocks_leading_lang_space.html
+++ b/test/tm-cases/fenced_code_blocks_leading_lang_space.html
@@ -1,5 +1,5 @@
if True:
- print "hi"
+ print "hi"
diff --git a/test/tm-cases/fenced_code_blocks_leading_lang_space.tags b/test/tm-cases/fenced_code_blocks_leading_lang_space.tags
index 2c03fb5d..7fa5d6a0 100644
--- a/test/tm-cases/fenced_code_blocks_leading_lang_space.tags
+++ b/test/tm-cases/fenced_code_blocks_leading_lang_space.tags
@@ -1 +1 @@
-extra fenced-code-blocks pygments
+extra fenced-code-blocks pygments pygments>=2.21
diff --git a/test/tm-cases/fenced_code_blocks_safe_highlight.html b/test/tm-cases/fenced_code_blocks_safe_highlight.html
index b77f50b1..5525e21c 100644
--- a/test/tm-cases/fenced_code_blocks_safe_highlight.html
+++ b/test/tm-cases/fenced_code_blocks_safe_highlight.html
@@ -1,6 +1,6 @@
if True:
- print "hi"
+ print "hi"
@@ -10,7 +10,7 @@
def foo
- puts "hi"
+ puts "hi"
end
diff --git a/test/tm-cases/fenced_code_blocks_safe_highlight.tags b/test/tm-cases/fenced_code_blocks_safe_highlight.tags
index b5480365..7fa5d6a0 100644
--- a/test/tm-cases/fenced_code_blocks_safe_highlight.tags
+++ b/test/tm-cases/fenced_code_blocks_safe_highlight.tags
@@ -1 +1 @@
-extra fenced-code-blocks pygments pygments>=2.14
+extra fenced-code-blocks pygments pygments>=2.21
diff --git a/test/tm-cases/fenced_code_blocks_syntax_highlighting.html b/test/tm-cases/fenced_code_blocks_syntax_highlighting.html
index b77f50b1..5525e21c 100644
--- a/test/tm-cases/fenced_code_blocks_syntax_highlighting.html
+++ b/test/tm-cases/fenced_code_blocks_syntax_highlighting.html
@@ -1,6 +1,6 @@
if True:
- print "hi"
+ print "hi"
@@ -10,7 +10,7 @@
def foo
- puts "hi"
+ puts "hi"
end
diff --git a/test/tm-cases/fenced_code_blocks_syntax_highlighting.tags b/test/tm-cases/fenced_code_blocks_syntax_highlighting.tags
index b5480365..7fa5d6a0 100644
--- a/test/tm-cases/fenced_code_blocks_syntax_highlighting.tags
+++ b/test/tm-cases/fenced_code_blocks_syntax_highlighting.tags
@@ -1 +1 @@
-extra fenced-code-blocks pygments pygments>=2.14
+extra fenced-code-blocks pygments pygments>=2.21
diff --git a/test/tm-cases/fenced_code_blocks_syntax_indentation.html b/test/tm-cases/fenced_code_blocks_syntax_indentation.html
index eedd7c65..37088fa0 100644
--- a/test/tm-cases/fenced_code_blocks_syntax_indentation.html
+++ b/test/tm-cases/fenced_code_blocks_syntax_indentation.html
@@ -1,7 +1,7 @@
def foo():
- print "foo"
+ print "foo"
- print "bar"
+ print "bar"
diff --git a/test/tm-cases/fenced_code_blocks_syntax_indentation.tags b/test/tm-cases/fenced_code_blocks_syntax_indentation.tags
index c88bf4e9..12dde3db 100644
--- a/test/tm-cases/fenced_code_blocks_syntax_indentation.tags
+++ b/test/tm-cases/fenced_code_blocks_syntax_indentation.tags
@@ -1 +1 @@
-extra fenced-code-blocks pygments indentation
+extra fenced-code-blocks pygments pygments>=2.21 indentation
diff --git a/test/tm-cases/hash_html_blocks_orphaned_close_tags.html b/test/tm-cases/hash_html_blocks_orphaned_close_tags.html
new file mode 100644
index 00000000..372f357d
--- /dev/null
+++ b/test/tm-cases/hash_html_blocks_orphaned_close_tags.html
@@ -0,0 +1,11 @@
+
+
+
+
+http:/onmouseover=alert(origin)
+
+-
diff --git a/test/tm-cases/hash_html_blocks_orphaned_close_tags.opts b/test/tm-cases/hash_html_blocks_orphaned_close_tags.opts
new file mode 100644
index 00000000..de64198e
--- /dev/null
+++ b/test/tm-cases/hash_html_blocks_orphaned_close_tags.opts
@@ -0,0 +1 @@
+{'safe_mode': 'escape'}
\ No newline at end of file
diff --git a/test/tm-cases/hash_html_blocks_orphaned_close_tags.text b/test/tm-cases/hash_html_blocks_orphaned_close_tags.text
new file mode 100644
index 00000000..5b654ac5
--- /dev/null
+++ b/test/tm-cases/hash_html_blocks_orphaned_close_tags.text
@@ -0,0 +1,6 @@
+* [
+ - ]()
+
+
+
+-
diff --git a/test/tm-cases/improper_void_tag_hashing_pr705.html b/test/tm-cases/improper_void_tag_hashing_pr705.html
new file mode 100644
index 00000000..2da86384
--- /dev/null
+++ b/test/tm-cases/improper_void_tag_hashing_pr705.html
@@ -0,0 +1,17 @@
+
+
+
+
+) <script>alert(origin)</script>
+
+"
diff --git a/test/tm-cases/improper_void_tag_hashing_pr705.opts b/test/tm-cases/improper_void_tag_hashing_pr705.opts
new file mode 100644
index 00000000..ad487c04
--- /dev/null
+++ b/test/tm-cases/improper_void_tag_hashing_pr705.opts
@@ -0,0 +1 @@
+{"safe_mode": "escape"}
diff --git a/test/tm-cases/improper_void_tag_hashing_pr705.text b/test/tm-cases/improper_void_tag_hashing_pr705.text
new file mode 100644
index 00000000..223862cf
--- /dev/null
+++ b/test/tm-cases/improper_void_tag_hashing_pr705.text
@@ -0,0 +1,10 @@
+---
+* ```
+ * ```
+
+ x
+```
+---
+```) ```
+"
+---
diff --git a/test/tm-cases/malformed_html_crash_issue584.html b/test/tm-cases/malformed_html_crash_issue584.html
index e2071f84..00f32cdb 100644
--- a/test/tm-cases/malformed_html_crash_issue584.html
+++ b/test/tm-cases/malformed_html_crash_issue584.html
@@ -1,3 +1,3 @@
-
-
+
diff --git a/test/tm-cases/pyshell_and_fenced_code_blocks.html b/test/tm-cases/pyshell_and_fenced_code_blocks.html
index 28b13705..874b20de 100644
--- a/test/tm-cases/pyshell_and_fenced_code_blocks.html
+++ b/test/tm-cases/pyshell_and_fenced_code_blocks.html
@@ -4,9 +4,9 @@ From Recipe 302035
>>> nprint(9876543210)
-'9 876 543 210'
->>> nprint(987654321, period=1, delimiter=",")
-'9,8,7,6,5,4,3,2,1,0'
+'9 876 543 210'
+>>> nprint(987654321, period=1, delimiter=",")
+'9,8,7,6,5,4,3,2,1,0'
diff --git a/test/tm-cases/pyshell_and_fenced_code_blocks.tags b/test/tm-cases/pyshell_and_fenced_code_blocks.tags
index a6296bc7..675b7fec 100644
--- a/test/tm-cases/pyshell_and_fenced_code_blocks.tags
+++ b/test/tm-cases/pyshell_and_fenced_code_blocks.tags
@@ -1 +1 @@
-extra fenced-code-blocks pygments pyshell
+extra fenced-code-blocks pygments pygments<2.21 pyshell
diff --git a/test/tm-cases/xss_autolink_url_contents.html b/test/tm-cases/xss_autolink_url_contents.html
new file mode 100644
index 00000000..894e73e1
--- /dev/null
+++ b/test/tm-cases/xss_autolink_url_contents.html
@@ -0,0 +1 @@
+http://x/<svg/onload=alert(origin)//{
diff --git a/test/tm-cases/xss_autolink_url_contents.text b/test/tm-cases/xss_autolink_url_contents.text
new file mode 100644
index 00000000..492e308c
--- /dev/null
+++ b/test/tm-cases/xss_autolink_url_contents.text
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/test/tm-cases/xss_from_incorrect_block_hashing.html b/test/tm-cases/xss_from_incorrect_block_hashing.html
new file mode 100644
index 00000000..db2fe827
--- /dev/null
+++ b/test/tm-cases/xss_from_incorrect_block_hashing.html
@@ -0,0 +1,14 @@
+
+
+
+
+[x](")}<img src="x" onerror="alert(origin)">
+
+
diff --git a/test/tm-cases/xss_from_incorrect_block_hashing.opts b/test/tm-cases/xss_from_incorrect_block_hashing.opts
new file mode 100644
index 00000000..54de31a8
--- /dev/null
+++ b/test/tm-cases/xss_from_incorrect_block_hashing.opts
@@ -0,0 +1 @@
+{"safe_mode": "escape"}
\ No newline at end of file
diff --git a/test/tm-cases/xss_from_incorrect_block_hashing.text b/test/tm-cases/xss_from_incorrect_block_hashing.text
new file mode 100644
index 00000000..d0770a4a
--- /dev/null
+++ b/test/tm-cases/xss_from_incorrect_block_hashing.text
@@ -0,0 +1,5 @@
+- [x]
+ 1. - [x]
+___
+[x](`")}
+___
diff --git a/test/tm-cases/xss_smuggling_spans_in_image_attrs.html b/test/tm-cases/xss_smuggling_spans_in_image_attrs.html
index 37cd276e..15d99a49 100644
--- a/test/tm-cases/xss_smuggling_spans_in_image_attrs.html
+++ b/test/tm-cases/xss_smuggling_spans_in_image_attrs.html
@@ -3,3 +3,23 @@
![<code>" onerror="alert(1)//</code>]()

+
+x
+
+x
+
+
+-
+
+
onerror=alert(origin) )
+
+
+
+"></code)
+
+http://onclick=alert(origin)//
+
+http://onclick=alert(origin)//[<codeClick me
]()>
+
+">`)
diff --git a/test/tm-cases/xss_smuggling_spans_in_image_attrs.text b/test/tm-cases/xss_smuggling_spans_in_image_attrs.text
index 4a5c25a8..bcca4fc0 100644
--- a/test/tm-cases/xss_smuggling_spans_in_image_attrs.text
+++ b/test/tm-cases/xss_smuggling_spans_in_image_attrs.text
@@ -2,4 +2,21 @@
![`" onerror="alert(1)//`]()
-
\ No newline at end of file
+
+
+[x](javascript:alert(origin))
+
+[x](javascript:1/alert(origin))
+
+-
+-  onerror=alert(origin) )
+
+
+
+
+
+
+
+![x](<"`"![x][id]
+[id]: x "`