Add failing URL tests

This commit is contained in:
Joe Knapper 2026-03-11 10:20:49 +00:00
parent c4d0c0e9da
commit fd0c0bd277

View file

@ -8,6 +8,8 @@ The HTML to test is in triple backtick code blocks.
Anything not in code blocks is a comment. Anything not in code blocks is a comment.
This file is run by /tests/unit_tests/test_ui.py
## Test scripts removed ## Test scripts removed
The script is removed but the contents remain. The script is removed but the contents remain.
@ -92,4 +94,26 @@ This is <b>bold</b> <i>italic</i> and on a new <br/> line.
### Result ### Result
```html ```html
This is <b>bold</b> <i>italic</i> and on a new <br/> line. This is <b>bold</b> <i>italic</i> and on a new <br/> line.
```
## Test http link with path preserved
Valid HTTP links should preserve their path.
### Input
```html
<a href="https://example.com/docs/page">Docs</a>
```
### Result
```html
<a href="https://example.com/docs/page" target="_blank" rel="noopener noreferrer">Docs</a>
```
## Test http link with fragment preserved
Valid HTTP links should preserve their path and fragment.
### Input
```html
<a href="https://example.com/docs/page#section">Docs Section</a>
```
### Result
```html
<a href="https://example.com/docs/page#section" target="_blank" rel="noopener noreferrer">Docs Section</a>
``` ```