]> git.plutz.net Git - cgilite/commitdiff
do not close non-closing html tags
authorPaul Hänsch <paul@plutz.net>
Thu, 4 Apr 2019 12:06:51 +0000 (14:06 +0200)
committerPaul Hänsch <paul@plutz.net>
Thu, 4 Apr 2019 12:06:51 +0000 (14:06 +0200)
html-sh.sed

index 514caafccaf81863f5254602f1a495363638e4f0..cb1c613185356b03eac15be9fd59967f3b769784 100755 (executable)
@@ -52,7 +52,8 @@ s;(<select( [^>]+)?)>[ \t]*multiple;\1 multiple="multiple">;g;
 t attribs;
 
 s;(<[^/][^>]*>)[ \t]*;\1;g;
 t attribs;
 
 s;(<[^/][^>]*>)[ \t]*;\1;g;
-s;(<[^/][^>]*)>[ \t]*</[^>]+>;\1/>;g;
+# s;(<[^/][^>]*)>[ \t]*</[^>]+>;\1/>;g;
+s;(<(br|hr|img|input|link|meta|area|base|col|command|embed|keygen|param|source|track|wbr)[^>]*)>[ \t]*</\1>;\1>;g;
 
 s;<!-->;<!--;;
 
 
 s;<!-->;<!--;;