Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to always force quoting unadorned ampersands #1124

Open
jidanni opened this issue Aug 18, 2024 · 2 comments
Open

No way to always force quoting unadorned ampersands #1124

jidanni opened this issue Aug 18, 2024 · 2 comments

Comments

@jidanni
Copy link
Contributor

jidanni commented Aug 18, 2024

Man page says

   --quote-ampersand Boolean (yes if unset)
          This option specifies if Tidy should
          output unadorned & characters as &, **in legacy doctypes only.**

That means there is no way to always force quoting. Tidy will always rip apart any quoting we do, unless we use a legacy doctype. "Thanks a lot."

See also #724.

Tidy 5.8.0

@jidanni
Copy link
Contributor Author

jidanni commented Aug 18, 2024

Well all I know is

$ echo \&amp\;|tidy 2>/dev/null|grep \&
&

@AnrDaemon
Copy link

One of the many related questions. The problem is REALLY annoying.

Transforming HTML with <script> tags to pass to the xpath tools like xmlstarlet is a nontrivial task with this bug around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants