diff --git a/www/common/common-hash.js b/www/common/common-hash.js index b9615ff1c..1d05710a8 100644 --- a/www/common/common-hash.js +++ b/www/common/common-hash.js @@ -383,7 +383,7 @@ Version 1 return '/' + type + '/#' + hash; }; Hash.hrefToHref = function (href) { - var parsed = parsedPadUrl(href); + var parsed = Hash.parsePadUrl(href); return parsed.hash; }; diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 4abb98510..412c0be41 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1037,6 +1037,10 @@ define([ var href = data.href || data.roHref; var parsed = Hash.parsePadUrl(href); var secret = Hash.getSecrets(parsed.type, parsed.hash, data.password); + if (isRo && secret.keys && secret.keys.editKeyStr) { + delete secret.keys.editKeyStr; + delete secret.key; + } var hash = Hash.getHiddenHashFromKeys(parsed.type, secret); var hiddenHref = Hash.hashToHref(hash, parsed.type); // XXX hidden hash: use settings