Skip to content

Commit 46c17ac

Browse files
committed
CAP: Escape uri and use wrap mode WORD_CHAR
1 parent 06e828d commit 46c17ac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Model/Utils/CAP.vala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ namespace EmA.CAP {
213213
var base_uri = Uri.parse ("https://", NONE);
214214
var uri = Uri.parse_relative (base_uri, url, NONE);
215215

216-
warn.web = "<a href=\"%s\">%s</a>".printf (uri.to_string (), url);
216+
warn.web = "<a href=\"%s\">%s</a>".printf (
217+
Markup.escape_text (uri.to_string ()),
218+
Markup.escape_text (url)
219+
);
217220
} catch (Error e) {
218221
warning ("Failed to parse URL: %s", e.message);
219222
warn.web = url;

src/UI/WarningPage.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public class EmA.WarningPage : Adw.NavigationPage {
134134
var content_label = new Gtk.Label (null) {
135135
xalign = 0,
136136
wrap = true,
137+
wrap_mode = WORD_CHAR,
137138
use_markup = true,
138139
};
139140
content_label.add_css_class ("dimmed");

0 commit comments

Comments
 (0)