mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-11-04 01:23:01 +00:00 
			
		
		
		
	Small revision to previous commit, avoids double encoding.
We don't need to encodeURIComponent at all when using blob links. The data never goes into the dom directly, just a guid reference. This makes saving with blobs very fast!
This commit is contained in:
		@@ -29,7 +29,7 @@ DownloadSaver.prototype.save = function(text) {
 | 
			
		||||
	var link = document.createElement("a");
 | 
			
		||||
	link.setAttribute("target","_blank");
 | 
			
		||||
	if(Blob != undefined) {
 | 
			
		||||
		var blob = new Blob([encodeURIComponent(text)], {type: "text/html"});
 | 
			
		||||
		var blob = new Blob([text], {type: "text/html"});
 | 
			
		||||
		link.setAttribute("href", URL.createObjectURL(blob));
 | 
			
		||||
	} else {
 | 
			
		||||
		link.setAttribute("href","data:text/html," + encodeURIComponent(text));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user