uniqueck / htmlSanityCheck.js

MIT License
0 stars 0 forks source link

[BUG] Document title can not be retrieved if it is empty #16

Closed uniqueck closed 3 months ago

uniqueck commented 3 months ago

What is the bug?

If no head title element is set, getTitle returns an error.

How can one reproduce the bug?

<meta charset="utf-8">
<script>location="url/to/getting-started.html"</script>
<meta http-equiv="refresh" content="0; url=url/to/getting-started.html">
<meta name="robots" content="noindex">
<title>Redirect Notice</title>
<h1>Redirect Notice</h1>
<p>The page you requested has been relocated to <a href="url/to/getting-started.html">url/to/getting-started.html</a>.</p>

What is the expected behavior?

An empty title if no title element is available