htmlhint / htmlhint/HTMLHint

False title-require error

Open
#1,916 1 comment 0 reactions 1 assignee View on GitHub

@coliff is already working on this.

Since Sep 1, 2026.

bug
Dominant language
JavaScript
Stars
3.3k
Forks
474
Avg merge
1d 11h
Merged PRs (30d)
12

Description

The following code will produce a <title></title> must not be empty. error.

<!-- this .shtml file takes advantage of Apache server side dynamic content -->

<head>
    <meta charset="UTF-8">
    <title>
        <!--#if expr="${REDIRECT_STATUS} = 400"-->
            Page Name: Bad Request
        <!--#elif expr="${REDIRECT_STATUS} = 403"-->
            Page Name: Forbidden
        <!--#elif expr="${REDIRECT_STATUS} = 404"-->
            Page Name: Resource Not Found
        <!--#else-->
            Page Name: Error <!--#echo var="REDIRECT_STATUS"-->
        <!--#endif-->
    </title>
</head>

Since there is an #else then there will always be a title.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.