Skip to content

Commit 65d3bf6

Browse files
committed
wasm: sanitize title contents
1 parent 3792ffe commit 65d3bf6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Add `FileDialog::set_show_hidden_files` and `AsyncFileDialog::set_show_hidden_files` to control hidden file visibility. Supported on macOS, Windows, and Linux (GTK3).
66
- Honor `FileDialog::set_directory` and `AsyncFileDialog::set_directory` when using the zenity fallback backend on Linux.
77
- Fix `liblary` typo in docs
8+
- Change wasm title to sanitize text contents via `title_el.set_text_content()` rather than `title_el.set_inner_html()`.
89

910
## 0.17.2
1011

src/backend/wasm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl<'a> WasmDialog<'a> {
5959
let title_el: HtmlElement = document.create_element("div").unwrap().dyn_into().unwrap();
6060

6161
title_el.set_id("rfd-title");
62-
title_el.set_inner_html(title);
62+
title_el.set_text_content(Some(title));
6363

6464
card.append_child(&title_el).unwrap();
6565
title_el

0 commit comments

Comments
 (0)