mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Otherwise alerts for multi-line `<a>` elements end up looking very red. I also took the opportunity to improve the tests slightly.
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
</head>
|
|
<body>
|
|
<h1>OK</h1>
|
|
<a href="http://example.com" target="_blank" rel="noopener noreferrer">Example</a>
|
|
<a href="http://example.com" target="_blank" rel="noreferrer">Example</a>
|
|
<a href="http://example.com" target="_blank" rel="noopener">Example</a>
|
|
<a data-ng-href="https://example.com" target="_blank" rel="noopener">Example</a>
|
|
|
|
<h1>OK, because of constant URL</h1>
|
|
<a href="http://example.com" target="_blank">Example</a>
|
|
<a href="http://example.com" target="_blank" rel="nopoener">Example</a>
|
|
<a data-ng-href="https://example.com" target="_blank">Example</a>
|
|
|
|
<h1>OK, because of constant prefix</h1>
|
|
<a href="http://example.com/{{X}}" target="_blank">Example</a>
|
|
<a href="http://example.com/{{X}}" target="_blank" rel="nopoener">Example</a>
|
|
<a data-ng-href="https://example.com/{{X}}" target="_blank">Example</a>
|
|
|
|
<h1>NOT OK, because of dynamic URL</h1>
|
|
<a href="http://example.com{{X}}" target="_blank">Example</a>
|
|
<a href="{{target}}" target="_blank">Example</a>
|
|
<a href="{{target}}" target="_blank">
|
|
Example
|
|
</a>
|
|
|
|
</body>
|
|
</html>
|