From 16f879b6f60349da03809693ddfa618afd36a093 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 17 Jun 2004 17:58:57 +0000 Subject: Escape strings before using the with markup in labels. Patch by Crispin 2004-06-17 Christian Persch * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: Escape strings before using the with markup in labels. Patch by Crispin Flowerday. --- ChangeLog | 8 ++++++++ embed/mozilla/GtkNSSClientAuthDialogs.cpp | 4 ++-- embed/mozilla/GtkNSSDialogs.cpp | 14 +++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f7e4d477c..30cbbd294 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-06-17 Christian Persch + + * embed/mozilla/GtkNSSClientAuthDialogs.cpp: + * embed/mozilla/GtkNSSDialogs.cpp: + + Escape strings before using the with markup in labels. + Patch by Crispin Flowerday. + 2004-06-15 Christian Persch * embed/mozilla/EphyBrowser.cpp: diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp index 7fb174e7a..23e91374b 100644 --- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp +++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp @@ -220,8 +220,8 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx, const nsACString &utf8_cn = NS_ConvertUCS2toUTF8(cn); - tt_cn = g_strdup_printf ("\"%s\"", - PromiseFlatCString(utf8_cn).get()); + tt_cn = g_markup_printf_escaped ("\"%s\"", + PromiseFlatCString(utf8_cn).get()); msg = g_strdup_printf (_("Choose a certificate to present as identification to %s."), tt_cn); diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp index d25f0d883..783a0546d 100644 --- a/embed/mozilla/GtkNSSDialogs.cpp +++ b/embed/mozilla/GtkNSSDialogs.cpp @@ -287,10 +287,10 @@ GtkNSSDialogs::ConfirmMismatchDomain (nsIInterfaceRequestor *ctx, cert->GetCommonName (commonName); - ttTargetUrl = g_strdup_printf ("\"%s\"", + ttTargetUrl = g_markup_printf_escaped ("\"%s\"", PromiseFlatCString(targetURL).get()); - ttCommonName = g_strdup_printf ("\"%s\"", + ttCommonName = g_markup_printf_escaped ("\"%s\"", NS_ConvertUCS2toUTF8(commonName).get()); first = g_strdup_printf (_("The site %s returned security information for " @@ -332,7 +332,7 @@ GtkNSSDialogs::ConfirmUnknownIssuer (nsIInterfaceRequestor *ctx, cert->GetCommonName (commonName); - ttCommonName = g_strdup_printf ("\"%s\"", + ttCommonName = g_markup_printf_escaped ("\"%s\"", NS_ConvertUCS2toUTF8(commonName).get()); secondary = g_strdup_printf @@ -436,7 +436,7 @@ GtkNSSDialogs::ConfirmCertExpired (nsIInterfaceRequestor *ctx, localtime_r (&t, &tm)); fdate = g_locale_to_utf8 (formattedDate, -1, NULL, NULL, NULL); - ttCommonName = g_strdup_printf ("\"%s\"", + ttCommonName = g_markup_printf_escaped ("\"%s\"", NS_ConvertUCS2toUTF8(commonName).get()); secondary = g_strdup_printf (text, ttCommonName, fdate); @@ -482,10 +482,10 @@ GtkNSSDialogs::NotifyCrlNextupdate (nsIInterfaceRequestor *ctx, cert->GetCommonName (commonName); - ttCommonName = g_strdup_printf ("\"%s\"", + ttCommonName = g_markup_printf_escaped ("\"%s\"", NS_ConvertUCS2toUTF8(commonName).get()); - ttTargetUrl = g_strdup_printf ("\"%s\"", + ttTargetUrl = g_markup_printf_escaped ("\"%s\"", PromiseFlatCString(targetURL).get()); primary = g_strdup_printf (_("Cannot establish connection to %s."), @@ -544,7 +544,7 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsAutoString commonName; cert->GetCommonName (commonName); - ttCommonName = g_strdup_printf ("\"%s\"", + ttCommonName = g_markup_printf_escaped ("\"%s\"", NS_ConvertUCS2toUTF8(commonName).get()); tertiary = g_strdup_printf (_("Trust %s to identify:"), ttCommonName ); -- cgit v1.2.3