提交 d0787c3c 编写于 作者: J Jerome Etienne

fix location.hash escaping

上级 1108e428
......@@ -82,7 +82,7 @@
var hasHash = location.hash.substring(1) !== '' ? true : false
if( hasHash === true ){
var urlOptions = JSON.parse(location.hash.substring(1))
var urlOptions = JSON.parse(decodeURIComponent(location.hash.substring(1)))
}else{
var urlOptions = {
trackingBackend: 'artoolkit',
......@@ -91,7 +91,7 @@
window.urlOptions = urlOptions
urlOptionsUpdate()
function urlOptionsUpdate(){
location.hash = '#'+JSON.stringify(urlOptions)
location.hash = '#'+encodeURIComponent(JSON.stringify(urlOptions))
}
//////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册