# Escape markdown special chars in file deletion confirmation dialog \(\#55697\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e5d86ae5c5f5a21afdcaaa06f05ba4b254cc22df

Requested commit: e5d86ae5c5f5a21afdcaaa06f05ba4b254cc22df

Commit: e5d86ae5c5f5a21afdcaaa06f05ba4b254cc22df

Tree: a67adca89308615f3085fce119b3e8d01f1bd126

Author: alkinun

Committer: GitHub

## Message

```
Escape markdown special chars in file deletion confirmation dialog (#55697)

## Summary

Filenames containing md syntax (e.g. `__somefile__`, `*somefile*`) were
being rendered as markdown text in the file deletion confirmation
dialog.

Fixes #55651

## Changes

Wrapped file paths with `MarkdownEscaped` in the single and multi-file
deletion confirmation dialogs in `project_panel.rs`, so special md chars
like `_`, `*`, and `[` are escaped before being rendered.

## Testing

Created a file named `__somefile__` and tried to delete it, the name now
displays literally in the confirmation dialog instead of being rendered
as bold text:
<img width="339" height="206" alt="img"
src="https://github.com/user-attachments/assets/93e4e7d1-d5dc-45bb-9c08-2fe83c75aad2"
/>

Also added `test_delete_prompt_escapes_markdown_in_file_name` in
`project_panel_tests.rs` that verifies filenames with markdown special
characters render literally in the confirmation dialog.

Release Notes:

- Fixed file names containing markdown special characters (e.g.
`__somefile__`)
being rendered as formatted text in the file deletion confirmation
dialog.
```

## Parents

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

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