[Xfce4-commits] <postler:master> Escape addresses against HTML for reply URIs

Christian Dywan noreply at xfce.org
Mon Jul 4 23:58:04 CEST 2011


Updating branch refs/heads/master
         to c13da109e8b408f94e46add8dce2b79d31c3fb01 (commit)
       from 6c3d874822993973385081930688b40751d0b33c (commit)

commit c13da109e8b408f94e46add8dce2b79d31c3fb01
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Jul 4 00:09:02 2011 +0200

    Escape addresses against HTML for reply URIs

 postler/postler-content.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 9afb4b4..d26031f 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -655,8 +655,8 @@ public class Postler.Content : WebKit.WebView {
 
     public string reply_uri (Message the_message, string? prefix=null, string? recipients=null) {
         string chosen_from = choose_from (the_message);
-        StringBuilder mailto = new StringBuilder (
-            recipients ?? (the_message.reply_to ?? the_message.sender));
+        string to = recipients ?? (the_message.reply_to ?? the_message.sender);
+        StringBuilder mailto = new StringBuilder (to);
         char delimiter = '?';
         if (prefix != null) {
             mailto.append_printf ("%csubject=%s%s",
@@ -786,8 +786,8 @@ public class Postler.Content : WebKit.WebView {
                     <a href="mailto:%s" class="button">%s</a>
                     <a href="mailto:%s" class="button">%s</a></div>
                     """.printf (
-                    reply_uri (child, "Re: "), _("Reply"),
-                    reply_uri (child, "Fw: "), _("Forward")));
+                    html_escape (reply_uri (child, "Re: ")), _("Reply"),
+                    html_escape (reply_uri (child, "Fw: ")), _("Forward")));
 
                 string reply_markup = reply_chunk.str;
                 /* The extra class importantMessage is Postler-specific */



More information about the Xfce4-commits mailing list