4 s,\\\\,\\,g; s,\\&,\&,g;
5 s,\\<,\<,g; s,\\>,\>,g;
6 s,\\",\",g; s,\\',\',g;
7 s,\\\[,\[,g; s,\\\],\],g;
8 s,\\\.,\.,g; s,\\#,\#,g;
14 H; s;^(.*)--].*$;\1-->;p;
15 g; s;^.*--]([^\n]*)$;\1;
16 x; s;^</!-->\n(.*)\n[^\n]*$;\1;; x;
25 s;\[hidden[ \t]+"([^"]*)"[ \t]+"([^"]*)";[input type="hidden" name="\1" value="\2";g;
26 s;\[checkbox[ \t]+"([^"]*)"[ \t]+"([^"]*)";[input type="checkbox" name="\1" value="\2";g;
27 s;\[radio[ \t]+"([^"]*)"[ \t]+"([^"]*)";[input type="radio" name="\1" value="\2";g;
28 s;\[submit[ \t]+"([^"]*)"[ \t]+"([^"]*)";[button type="submit" name="\1" value="\2";g;
29 s;\[a[ \t]+"([^"]*)";[a href="\1";g;
30 s;\[img[ \t]+"([^"]*)"[ \t]+"([^"]*)";[img src="\1" alt="\2";g;
32 s;\[!([^]\[]*)\];<!\1>;g;
33 s;\[!--([^]\[]*)--\];<!--\1-->;g;
36 s;\[([^]\[< \t]+)([^]\[]*)\];<\1>\2</\1>;g;
41 s;^([^]\n]*)\]([^\n]*)\n([^\n]+);\1\3\2;
43 h; s;^([^\n]*)\n;;; x; s;\n.*$;;;
46 s;^([^\[\n]*)\[([^]\[< \t\n]+)([^\n]*);\1<\2>\3\n</\2>;
48 G; h; s;^[^\n]*\n+;;; x; s;\n.*$;;;
51 s;class="([^>]+)>[ \t]*\.([^< \t]+);class="\2 \1>;g; t attribs;
52 s;(<[^/][^>]*)>[ \t]*\.([^< \t]+);\1 class="\2">;g;
53 s;(<[^/][^>]*)>[ \t]*#([^< \t]+);\1 id="\2">;g;
54 s;(<[^/][^>]*)>[ \t]*([^ \t=<]+=("[^"]*"|'[^']*'|[^< \t]*));\1 \2>;g;
56 s;(<input ([^>]+ )?type=(radio|"radio"|'radio')( [^>]+)?)>[ \t]*(checked|selected);\1 checked="checked">;g;
57 s;(<input ([^>]+ )?type=(checkbox|"checkbox"|'checkbox')( [^>]+)?)>[ \t]*(checked|selected);\1 checked="checked">;g;
58 s;(<option( [^>]+)?)>[ \t]*(checked|selected);\1 selected="selected">;g;
59 s;(<select( [^>]+)?)>[ \t]*multiple;\1 multiple="multiple">;g;
61 s;(<[^/][^>]*>)[ \t]*\.[ \t];\1;g;
63 s;(<[^/][^>]*>)[ \t]*;\1;g;
64 # s;(<[^/][^>]*)>[ \t]*</[^>]+>;\1/>;g;
65 s;(<(br|hr|img|input|link|meta|area|base|col|command|embed|keygen|param|source|track|wbr)[^>]*)>[ \t]*</\1>;\1>;g;