(self)
| 714 | self.assertEqual(dom[0], "foo") |
| 715 | |
| 716 | def test_parse_html_in_script(self): |
| 717 | parse_html('<script>var a = "<p" + ">";</script>') |
| 718 | parse_html(""" |
| 719 | <script> |
| 720 | var js_sha_link='<p>***</p>'; |
| 721 | </script> |
| 722 | """) |
| 723 | |
| 724 | # script content will be parsed to text |
| 725 | dom = parse_html(""" |
| 726 | <script><p>foo</p> '</scr'+'ipt>' <span>bar</span></script> |
| 727 | """) |
| 728 | self.assertEqual(len(dom.children), 1) |
| 729 | self.assertEqual(dom.children[0], "<p>foo</p> '</scr'+'ipt>' <span>bar</span>") |
| 730 | |
| 731 | def test_void_elements(self): |
| 732 | for tag in VOID_ELEMENTS: |
nothing calls this directly
no test coverage detected