Skip to content

Make tidy generate an error/warning if there are angle brackets #723

@petdance

Description

@petdance
$ cat -n foo.html
     1  <!DOCTYPE html>
     2  <html>
     3      <head>
     4          <title> </title>
     5      </head>
     6      <body>
     7          This & that.
     8          Unescaped open angle bracket < and an unescaped close bracket >.
     9      </body>
    10  </html>

I was surprised that Tidy did not complain about the < and > on line 8.

$ tidy -q -e foo.html
$ tidy -q foo.html
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.6.0">
<title></title>
</head>
<body>
This & that. Unescaped open angle bracket &lt; and an unescaped
close bracket &gt;.
</body>
</html>

The -e showed no errors, and tidy just automatically converted > to &gt; and < to &lt;. I was expecting it to complain. Or did I miss a config option?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions