[geary/wip/713830-disposition] Escape the CID when searching as well



commit 3fb25948080b2515d8bb3468f3830d312a464e3c
Author: Robert Schroll <rschroll gmail com>
Date:   Tue Aug 5 14:56:23 2014 -0400

    Escape the CID when searching as well
    
    Also, add a debug statement, since no match results in an null element,
    not an error.

 .../conversation-viewer/conversation-viewer.vala   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index 4f9a9e8..61a2104 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -1745,11 +1745,12 @@ public class ConversationViewer : Gtk.Box {
             // Remove any inline images that were referenced through Content-ID
             foreach (string cid in inlined_content_ids) {
                 try {
-                    WebKit.DOM.Element? img = container.query_selector(@"[cid='$cid']");
+                    string escaped_cid = Geary.HTML.escape_markup(cid);
+                    WebKit.DOM.Element? img = container.query_selector(@"[cid='$escaped_cid']");
                     if (img != null)
                         img.parent_element.remove_child(img);
                 } catch (Error error) {
-                    // expected if no such element
+                    debug("Error removing inlined image: %s", error.message);
                 }
             }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]