diff --git a/client/commonFramework.js b/client/commonFramework.js index 20ba4b40e1..ef3427928c 100644 --- a/client/commonFramework.js +++ b/client/commonFramework.js @@ -136,8 +136,16 @@ common.codeUri = (function(common, encode, decode, location, history) { if (!codeUri.enabled) { return null; } - location.hash = '?solution=' + - codeUri.encode(encodeFcc(solution)); + if (history && typeof history.replaceState === 'function') { + history.replaceState( + history.state, + null, + '?solution=' + codeUri.encode(encodeFcc(solution)) + ); + } else { + location.hash = '?solution=' + + codeUri.encode(encodeFcc(solution)); + } return solution; },