egoist
7/23/2016 - 2:24 PM

Make data URL-safe

Make data URL-safe

function updateHash(){
      window.location.hash = btoa( // base64 so url-safe
        RawDeflate.deflate( // gzip
          unescape(encodeURIComponent( // convert to utf8
            editor.getValue()
          ))
        )
      );
    }