Skip to content

Option to always encode double ampersands #827

@ghost

Description

Replicate
Create test.html:

<!DOCTYPE html>
<html>
<body>
Hello &amp;&amp; world!
</body>
</html>

Run:

tidy -m -q --wrap 0 --tidy-mark no --vertical-space auto --doctype html5 test.html

Expected Results

<!DOCTYPE html><html><head><title></title></head><body>Hello &amp;&amp; world!</body></html>

Actual Results

<!DOCTYPE html><html><head><title></title></head><body>Hello &amp;& world!</body></html>

Note the ampersands.

Discussion

While this behaviour is correct for HTML5, it would be nice to have an option to always encode them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions