dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
629 stars 170 forks source link

Documentation for unsafe_html is insufficient #2348

Open Hixie opened 3 years ago

Hixie commented 3 years ago

https://dart-lang.github.io/linter/lints/unsafe_html.html doesn't give any reason why these patterns are bad.

Even as someone who wrote the specification for many of these Web features, I literally could not tell you why some of these are so bad that we should lint them entirely out of existence (especially with an unignorable lint).

pq commented 3 years ago

/cc @srawlins

gmpassos commented 3 years ago

The lint says that is unsafe to set the href of an AnchorElement. But what’s is the correct (secure) way to do this? Will be nice to have it in the docs.