Document the Adwaita markup-default trap

This commit is contained in:
raucao committed 2026-11-13 21:03:53 +04:00
1 parent 993b691ceb
commit 30ba603df7
1 file changed
+9 -2
+9 -2
View File
@@ -33,6 +33,7 @@ src/signer/policy.rs the auto-approval rate limit
src/store/apps.rs the registry of approved applications + their permissions
src/store/keys.rs key storage (Secret Service, one item per key)
src/ui/approval.rs approval dialogs
src/ui/plain.rs plain-text rows/banners/dialogs (markup off)
src/ui/keys_view.rs the keys page
src/ui/signer_view.rs the signer page (pairing string, QR, state)
src/ui/qr.rs QR → GdkTexture
@@ -153,8 +154,14 @@ UI lives in `data/resources/ui/*.blp` (Blueprint) and is compiled to `.ui` by
(`is_bunker()`, `relays()`, `secret()`) — use it.
6. Requests arrive NIP‑44 encrypted; fall back to NIP‑04 for legacy clients.
Respond NIP‑44.
7. `AdwAlertDialog`'s `heading` and `body` default to **Pango markup**
(`heading-use-markup`/`body-use-markup` are `true`). Set both to `false`, and
7. Several **Adwaita** widgets render text as **Pango markup by default**:
`AdwAlertDialog` heading/body (`heading-use-markup`/`body-use-markup`),
`AdwActionRow` title/subtitle (`AdwPreferencesRow:use-markup`) and
`AdwBanner` title. `gtk::Label` does **not** (it defaults to plain). Feeding
markup-rendered widgets dynamic text breaks rendering on the first `&` (a
`bunker://…&secret=…` connection string shows nothing) and lets a client
inject formatting. Build them through `crate::ui::plain`
(`plain::row`, `plain::banner`, `plain::dialog`), which turns markup off;
put untrusted text in an `extra-child` of plain, selectable labels.
## Blueprint / Meson traps