diff --git a/fhem/contrib/pre-commit b/fhem/contrib/pre-commit index ef1fc5077..e9633995d 100755 --- a/fhem/contrib/pre-commit +++ b/fhem/contrib/pre-commit @@ -129,7 +129,12 @@ foreach my $row (split("\n", $fList)) { $hasLink = ($l =~ m//gi); + if($l =~ m/<$tag ([^>]+)>/i) { + my $attr = $1; + err $fName, "$lang line $line: $tag with attributes (apart ". + "from class) is not allowed\n" ; + } + $tagcount{$tag} +=()= ($l =~ /<$tag( [^>]+)?>/gi); $tagcount{$tag} -=()= ($l =~ /<\/$tag>/gi); if($tagcount{$tag} < 0) { err $fName, "$lang: negative tagcount for $tag, line $line";