Skip to content

anchor-as-name: false replaces name attribute of a form tag with id attribute #571

@suchafreak

Description

@suchafreak

Given this markup:

<!doctype html>
<html lang="de-CH">
<head>
  <meta charset="UTF-8"/>
  <title>Form with name attribute</title>
</head>
<body>
<form name="test"></form>
</body>

and anchor-as-name set to false tidy returns this:


<html lang="de-CH">
<head>
<meta charset="UTF-8">
<title>Form with name attribute</title>
</head>
<body>
<form id="test"></form>
</body>
</html>

I would expect tidy to not alter the form tag.
Instead of
<form id="test"></form>

I would expect the original

<form name="test"></form>

The form tag is not an anchor element and should therefore be unaffected by anchor-as-name

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions