var browserTests = [ ["foo[]bar", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}bar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}bar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["[foobar]baz", [["stylewithcss","true"],["inserthtml","abcd"]], "abcd{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["[foobar]baz", [["stylewithcss","false"],["inserthtml","abcd"]], "abcd{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["{foobar}baz", [["stylewithcss","true"],["inserthtml","abcd"]], "abcd{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["{foobar}baz", [["stylewithcss","false"],["inserthtml","abcd"]], "abcd{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[barbaz]", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[barbaz]", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo{barbaz}", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo{barbaz}", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[barbaz]quz", [["stylewithcss","true"],["inserthtml","abcd"]], "fooabcd{}quz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[barbaz]quz", [["stylewithcss","false"],["inserthtml","abcd"]], "fooabcd{}quz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["inserthtml",""]], "foo[]baz", [true], {"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["inserthtml","\u0000"]], "foo[]baz", [true], {"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["inserthtml","\u0007"]], "foo\u0007{}baz", [true], {"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["inserthtml",""]], "foo{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["inserthtml",""]], "foo{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["inserthtml","abc"]], "fooabc{}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["inserthtml","abc"]], "fooabc{}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["

foo[bar]baz", [["defaultparagraphseparator","div"],["inserthtml","

abc"]], "

foo

abc

{}

baz

", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["

foo[bar]baz", [["defaultparagraphseparator","p"],["inserthtml","

abc"]], "

foo

abc

{}

baz

", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["

foo[bar]baz", [["defaultparagraphseparator","div"],["inserthtml","

  • abc"]], "

    foo

    abc
    {}

    baz

    ", [true,true], {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["

    foo[bar]baz", [["defaultparagraphseparator","p"],["inserthtml","

  • abc"]], "

    foo

    abc

    {}

    baz

    ", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["
      {
    1. foo
    2. }
    3. bar
    ", [["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "

    abc

    {}
    1. bar
    ", [true,true], {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["
      {
    1. foo
    2. }
    3. bar
    ", [["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "

    abc

    {}
    1. bar
    ", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["
    1. foo
    2. {
    3. bar
    4. }
    5. baz
    ", [["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "

    1. foo

    abc

    {}
    1. baz
    ", [true,true], {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["
    1. foo
    2. {
    3. bar
    4. }
    5. baz
    ", [["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "

    1. foo

    abc

    {}
    1. baz
    ", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["
    1. [foo]
    2. bar
    ", [["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "

    1. abc

      {}
    2. bar
    ", [true,true], {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["
    1. [foo]
    2. bar
    ", [["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "

    1. abc

      {}
    2. bar
    ", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","abc"]], "fabc{}o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["stylewithcss","true"],["inserthtml","abc"]], "f<b>abc</b>{}o", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["stylewithcss","false"],["inserthtml","abc"]], "f<b>abc</b>{}o", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["bar", [["inserthtml","abc"]], "bar", [true], {"inserthtml":[false,false,"",false,false,""]}], ["bar", [["stylewithcss","true"],["inserthtml","abc"]], "bar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["bar", [["stylewithcss","false"],["inserthtml","abc"]], "bar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","abc"]], "fabc{}o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","abc"]], "fabc{}o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    f[o]o", [["defaultparagraphseparator","div"],["inserthtml","


    "]], "

    f


    {}

    o

    ", [true,true], {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["

    f[o]o", [["defaultparagraphseparator","p"],["inserthtml","


    "]], "

    f


    {}

    o

    ", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["stylewithcss","true"],["inserthtml","
    "]], "f
    {}o", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["stylewithcss","false"],["inserthtml","
    "]], "f
    {}o", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["

    f[o]o

    ", [["inserthtml","

    abc

    "]], "

    f

    abc

    {}

    o

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    f[o]o
    ", [["inserthtml","abc"]], "
    fabc{}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","abc"]], "fabc{}o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    f[o]o
    bar
    ", [["inserthtml","
    abc
    "]], "
    f
    abc
    {}
    o
    bar
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    foo
    b[a]r
    ", [["inserthtml","
    abc
    "]], "
    foo
    b
    abc
    {}
    r
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    f[o]o
    bar
    ", [["inserthtml","
    abc
    "]], "
    f
    abc
    {}
    o
    bar
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    foo
    b[a]r
    ", [["inserthtml","
    abc
    "]], "
    foo
    b
    abc
    {}
    r
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","
    abc
    "]], "f
    abc
    {}
    o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    1. f[o]o
    ", [["inserthtml","
    abc
    "]], "
    1. f
      abc
      {}
      o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","
    abc
    "]], "f
    abc
    {}
    o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    1. f[o]o
    ", [["inserthtml","
    abc
    "]], "
    1. f
      abc
      {}
      o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
  • f[o]o
  • ", [["inserthtml","
  • abc
  • "]], "
  • f
  • abc
  • {}
  • o
  • ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    1. f[o]o
    ", [["inserthtml","
  • abc
  • "]], "
    1. f
    2. abc
    3. {}
    4. o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    • f[o]o
    ", [["inserthtml","
  • abc
  • "]], "
    • f
    • abc
    • {}
    • o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
  • f[o]o
  • ", [["inserthtml","
  • abc
  • "]], "
  • f
  • abc
  • {}o
  • ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    1. f[o]o
    ", [["inserthtml","
  • abc
  • "]], "
    1. f
    2. abc
    3. {}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    • f[o]o
    ", [["inserthtml","
  • abc
  • "]], "
    • f
    • abc
    • {}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
  • f[o]o
  • ", [["inserthtml","
    1. abc
    "]], "
  • f
    1. abc
    {}o
  • ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    1. f[o]o
    ", [["inserthtml","
    1. abc
    "]], "
    1. f
      1. abc
      {}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    • f[o]o
    ", [["inserthtml","
    1. abc
    "]], "
    • f
      1. abc
      {}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
  • f[o]o
  • ", [["inserthtml","
    • abc
    "]], "
  • f
    • abc
    {}o
  • ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    1. f[o]o
    ", [["inserthtml","
    • abc
    "]], "
    1. f
      • abc
      {}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["
    • f[o]o
    ", [["inserthtml","
    • abc
    "]], "
    • f
      • abc
      {}o
    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["defaultparagraphseparator","div"],["inserthtml","
  • abc
  • "]], "f
    abc
    {}o", [true,true], {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["defaultparagraphseparator","p"],["inserthtml","
  • abc
  • "]], "f

    abc

    {}o", [true,true], {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","abc"]], "fabc{}o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["f[o]o", [["inserthtml","abc"]], "fabc{}o", [true], {"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["foo[]bar", [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","

    abc"]], "foo

    abc

    {}bar", [true,true,true], {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}], ["

    [foo]

    ", [["inserthtml"," "]], "

    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    [foo]

    ", [["stylewithcss","true"],["inserthtml",""]], "

    {}

    ", [true,true], {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}], ["

    [foo]

    ", [["stylewithcss","false"],["inserthtml",""]], "

    {}

    ", [true,true], {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}], ["

    [foo]

    ", [["inserthtml",""]], "

    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    {}

    ", [["inserthtml","abc"]], "

    abc{}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    {}

    ", [["inserthtml",""]], "

    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    {}

    ", [["inserthtml","abc"]], "

    abc{}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    {}

    ", [["inserthtml",""]], "

    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    {}

    ", [["inserthtml","abc"]], "

    abc{}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["

    {}

    ", [["inserthtml",""]], "

    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["


    {}

    ", [["inserthtml","abc"]], "


    abc{}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["


    {}

    ", [["inserthtml",""]], "


    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["


    {}

    ", [["inserthtml","abc"]], "


    abc{}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["


    {}

    ", [["inserthtml",""]], "


    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["


    {}

    ", [["inserthtml","abc"]], "


    abc{}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}], ["


    {}

    ", [["inserthtml",""]], "


    {}

    ", [true], {"inserthtml":[false,false,"",false,false,""]}] ]