aboutsummaryrefslogtreecommitdiff
path: root/node_modules/htmlparser2/test/Events/21-entity_in_attribute.json
blob: 77eb4f363cde6437240d2cbf51f6a00b3e56d82f (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
{
  "name": "entity in attribute",
  "options": {
    "handler": {},
    "parser": {"decodeEntities": true}
  },
  "html": "<a href='http://example.com/p&#x61;ge?param=value&param2=&lt;val'>",
  "expected": [
    {
      "event": "opentagname",
      "data": [
        "a"
      ]
    },
    {
      "event": "attribute",
      "data": [
        "href",
        "http://example.com/page?param=value&param2=<val"
      ]
    },
    {
      "event": "opentag",
      "data": [
        "a",
        {
          "href": "http://example.com/page?param=value&param2=<val"
        }
      ]
    },
    {
      "event": "closetag",
      "data": [
        "a"
      ]
    }
  ]
}