Bug 38365: Make tidy.pl compatible with script elements with attributes
tidy.pl will still tidy whitespace around script elements that have attributes like "nonce" Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
4d589b659d
commit
e011f2f6e1
|
|
@ -169,7 +169,7 @@ sub tidy_tt {
|
|||
$content =~ s#<!--</head>-->#</head>#g;
|
||||
$content =~ s#<!--<body(.*)-->#<body$1#g;
|
||||
$content =~ s#<!--</body>-->#</body>#g;
|
||||
$content =~ s#\n*( *)<script>\n*#\n$1<script>\n#g;
|
||||
$content =~ s#\n*( *)(<script\b[^>]*>)\n*#\n$1$2\n#g;
|
||||
$content =~ s#\n*( *)</script>\n*#\n$1</script>\n#g;
|
||||
$content =~ s#(\[%\s*SWITCH[^\]]*\]\n)\n#$1#g;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue