[gnome-software/wip/gs-details-page-escape-uris-for-markup] gs-details-page: Escape URIs for markup
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/gs-details-page-escape-uris-for-markup] gs-details-page: Escape URIs for markup
- Date: Wed, 9 Mar 2022 18:09:54 +0000 (UTC)
commit 497f4b3c65ca2f086e45d5215fd54ead20728bec
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 9 19:08:40 2022 +0100
gs-details-page: Escape URIs for markup
When the URL contains additional parameters, like '&', these need to
be escaped, otherwise gtk's markup parser claims an error.
src/gs-details-page.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 9c539482c..5d2b7bb7f 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -937,8 +937,10 @@ update_action_row_from_link (AdwActionRow *row,
AsUrlKind url_kind)
{
const gchar *url = gs_app_get_url (app, url_kind);
- if (url != NULL)
- adw_action_row_set_subtitle (row, url);
+ if (url != NULL) {
+ g_autofree gchar *escaped_url = g_markup_escape_text (url, -1);
+ adw_action_row_set_subtitle (row, escaped_url);
+ }
gtk_widget_set_visible (GTK_WIDGET (row), url != NULL);
return (url != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]