Intent-Code Divergence
Medium
- Confidence
- 99% confidence
- Finding
- The document correctly warns that unsanitized href values can cause XSS or open redirect issues, but the provided sanitizer example is broken and may mislead developers into thinking they are protected. It contains inconsistent variable names and an incorrect allowlist format, which can cause the check to fail or be reimplemented incorrectly, increasing the chance that unsafe URLs are passed into <a href> rendering.
