Skip to content

tidy-mark:no leaves blank line on pages with <script> in head #801

Open
@da2x

Description

@da2x

Steps to reproduce:

echo "<head><script>();</script></head>" | tidy -q --tidy-mark 0

Test results:

<!DOCTYPE html>
<html>
<head>

<script>
();
</script>
<title></title>
</head>
<body>
</body>
</html>

The problem doesn’t occur when the script is in body instead of in head:

echo "<body><script>();</script></body>" | tidy -q --tidy-mark 0

Test results:

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script>
();
</script>
</body>
</html>

Also, doesn’t happen with a meta element in head instead of script.

Version: HTML Tidy for Linux version 5.6.0

Possibly related issues: #760

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions