# editor: Decode escaped characters in hover popover links \(\#55973\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/950ec7943f3f1c0532caf6b91d818fb6349c8927)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 950ec7943f3f1c0532caf6b91d818fb6349c8927

Requested commit: 950ec7943f3f1c0532caf6b91d818fb6349c8927

Commit: 950ec7943f3f1c0532caf6b91d818fb6349c8927

Tree: b1228b33b7f7f0ae00ec4ac6f880d1fbea32b7d8

Author: Matt Good

Committer: GitHub

## Message

```
editor: Decode escaped characters in hover popover links (#55973)

Decodes url escape sequences in hover preview `file:///` links like
escaped
spaces in the file path.

I'm working on an LSP and happened to be working with some files in a
directory with spaces. When adding Markdown links with `file:///` the
`%20` escape for spaces was being included verbatim in the path that Zed
tried to open.

I'm reusing the lines from `markdown_preview_view.rs` for decoding. In
the existing tests I don't see coverage for `file:///` links. If you'd
like some tests for this can you point me to any examples to start from?

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed decoding spaces and other escaped characters in `file://` links
used in hover popovers

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [f9c994796ad4341649d7b8664edbdfaae8bebd5d](https://git.cafe/gitcafe/zed/commit/f9c994796ad4341649d7b8664edbdfaae8bebd5d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/950ec7943f3f1c0532caf6b91d818fb6349c8927?format=markdown)
