From: Paul Hänsch Date: Mon, 16 Jul 2018 22:59:51 +0000 (+0200) Subject: support for "selected" keyword, improved handling of "checked" X-Git-Url: http://git.plutz.net/?p=cgilite;a=commitdiff_plain;h=d45f9673ac73e57aa307db2514e6233dd673b7db support for "selected" keyword, improved handling of "checked" --- diff --git a/html-sh.sed b/html-sh.sed index 4af3933..1f988b3 100755 --- a/html-sh.sed +++ b/html-sh.sed @@ -44,7 +44,10 @@ s;class="([^>]+)>[ \t]+\.([^< \t]+);class="\2 \1>;g; t attribs; s;>[ \t]+\.([^< \t]+); class="\1">;g; s;>[ \t]+#([^< \t]+); id="\1">;g; s;>[ \t]+([^ \t=<]+=("[^"]*"|'[^']*'|[^< \t]*)); \1>;g; -s;(]+)>[ \t]+checked;\1 checked="checked">;g; +t attribs; +s;(]+ )?type=(radio|"radio"|'radio')( [^>]+)?)>[ \t]+checked;\1 checked="checked">;g; +s;(]+ )?type=(checkbox|"checkbox"|'checkbox')( [^>]+)?)>[ \t]+checked;\1 checked="checked">;g; +s;(]+))>[ \t]+(checked|selected);\1 selected="selected">;g; t attribs; s;(<[^/][^>]*>)[ \t]*;\1;g;