"use strict";

angular.module("hikeio").
	directive("preloadResource", ["resourceCache", function(resourceCache) {
		return {
			link: function (scope, element, attrs) {
				// # HACKY, browser is doing some processing on the html before I can get to it, 
				// even though it is properly escaped on the backend.
				var unescaped = element.html().replace(/"\\&quot;|\\&quot;"/g, "\\\"");
				resourceCache.put(attrs.preloadResource, unescaped);
			}
		};
	}]);
@@ -381,16 +381,39 @@
  %22%5C%5C%5C%22%22)
+.replace(/&amp;/g, %22&%22)
 ;%0A%09%09%09%09re

Add another tacky workaround for value getting escaped by DOM.