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

[tor-commits] [atlas/master] Fixes SVG downloads for Firefox 58



commit 7d68fb16762c04360c73eb4b14798658c51e8953
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date:   Thu Dec 14 05:16:23 2017 +0000

    Fixes SVG downloads for Firefox 58
    
    See: https://blog.mozilla.org/security/2017/11/27/blocking-top-level-navigations-data-urls-firefox-58/
---
 js/views/aggregate/map.js | 2 +-
 js/views/details/main.js  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/js/views/aggregate/map.js b/js/views/aggregate/map.js
index 367845c..1e1bca4 100644
--- a/js/views/aggregate/map.js
+++ b/js/views/aggregate/map.js
@@ -129,7 +129,7 @@ define([
       html = d3.select("#aggregate-map")
         .node()
         .innerHTML;
-      window.open("data:image/svg+xml;base64," + btoa(html), "SaveSVG");
+      window.open("data:data/xml;base64," + btoa(html), "SaveSVG");
     },
     render: function(query){
       document.title = "Relay Search";
diff --git a/js/views/details/main.js b/js/views/details/main.js
index 3597dca..7f0770f 100644
--- a/js/views/details/main.js
+++ b/js/views/details/main.js
@@ -163,7 +163,7 @@ define([
                 .node()
                 .innerHTML;
             d3.select("#save_" + g)
-                .attr("href", "data:image/svg+xml;base64," + btoa(html));
+                .attr("href", "data:data/xml;base64," + btoa(html));
         },
         render: function() {
             var data = {relay: this.model};

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits