darkreader / darkreader/darkreader

[Bug] Long `file:` URIs containing unusual character escapes render invisibly outside the path border, lowering GUI elements beneath it.

Open
#13,410 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
22.4k
Forks
2.7k
Avg merge
21h 11m
Merged PRs (30d)
78

Description

### Prerequisites

- [X] I [searched for any existing report](https://github.com/darkreader/darkreader/issues?q=is%3Aissue) about this bug to avoid opening a duplicate.
- [X] I can reproduce this bug in a new, unmodified web browser profile with Dark Reader installed as the only extension.
- [X] I understand I need to use the [Broken Website Report template](https://github.com/darkreader/darkreader/issues/new?assignees=&labels=Broken+Website&template=broken-website-report.yml&title=%5BBroken+Website%5D+Replace+with+title) if this bug I am reporting occurs on a single website.

### Bug Description

I expected that this was due to the length of the URI, so I took it to its logical extreme to verify, with a path named the undermentioned:

```URI
file:///home/RokeJulianLockhart/Documents/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.HTML
```

However, this didn't work:

> ![Screenshot_20241022_232115](https://github.com/user-attachments/assets/9eccade8-26b5-4647-954e-3a72dc7f9ac0)

Instead, the sole path which I've reliably been able to reproduce this on is the undermentioned:

```URI
file:///home/RokeJulianLockhart/Documents/%09%60%7Bkey:%20%22value%22,%20key:%20%22value%22,%20key:%20%22value%22,%20key:%20%22value%22,%20key:%20%22value%22%7D%60%7B.JSON5%7D.txt.HTML
```

...as the undermentioned screenshot demonstrates:

> ![Screenshot_20241022_232135](https://github.com/user-attachments/assets/89147ef7-2f96-4f0e-b831-e90d8275d35c)

I don't yet know which characters, or combinations thereof, cause it. However, I shall endeavour to ascertain which.

### Website Address


moz-extension://8b98e65d-a645-4219-80e1-85f41ecb43bd/ui/popup/index.html

### Steps To Reproduce

```PS1
#!/usr/bin/env -S pwsh
$FileName = ' `{key: "value", key: "value", key: "value", key: "value", key: "value"}`{.JSON5}.txt.HTML'
New-Item `
-Path "$PWD" `
-Name "$FileName" `
-ItemType "File" `
firefox "$FileName"
```

### Expected Behavior

1. Elements beneath the label should not be moved if the label is to remain concatenated.
2. Ideally, the label should not be concatenated. It should be entirely visible, and collapsible.

### Actual Behavior

As aforementioned.

### Screenshots

As aforementioned.

### Operating System

[`Fedora-KDE-Live-x86_64-40`](https://download.fedoraproject.org/pub/fedora/linux/releases/40/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-40-1.14.iso)

1. ```sh
#!/usr/bin/env sh
kinfo
```

1.

```YAML
Operating System: Fedora Linux 40
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.11.4-201.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.4 GiB of RAM
Graphics Processor: AMD Radeon RX 5700
```

### Web Browser name and version

[`fedora-updates-x86_64/firefox-131.0.3-1.fc40.x86_64.rpm`](https://fedora.pkgs.org/40/fedora-updates-x86_64/firefox-131.0.3-1.fc40.x86_64.rpm.html)

### Dark Reader version

[`darkreader-4.9.94.xpi` from `addons.mozilla.org`](https://addons.mozilla.org/firefox/downloads/file/4359254/darkreader-4.9.94.xpi). [^1]

[^1]: [`v4.9.95/darkreader-firefox.xpi`](https://github.com/darkreader/darkreader/releases/download/v4.9.95/darkreader-firefox.xpi)

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.