Blame view

node_modules/domhandler/test/cases/04-unescaped_in_script.json 715 Bytes
aaac7fed   liuqimichale   add
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
  {
    "name": "Unescaped chars in script",
    "options": {},
    "html": "<head><script language=\"Javascript\">var foo = \"<bar>\"; alert(2 > foo); var baz = 10 << 2; var zip = 10 >> 1; var yap = \"<<>>>><<\";</script></head>",
    "expected": [
      {
        "type": "tag",
        "name": "head",
        "attribs": {},
        "children": [
          {
            "type": "script",
            "name": "script",
            "attribs": {
              "language": "Javascript"
            },
            "children": [
              {
                "data": "var foo = \"<bar>\"; alert(2 > foo); var baz = 10 << 2; var zip = 10 >> 1; var yap = \"<<>>>><<\";",
                "type": "text"
              }
            ]
          }
        ]
      }
    ]
  }