fix(code-uri): Chrome iframe error with XSS Auditor
- remove solution from URI when read - remove querify solution upon edit or reset
This commit is contained in:
@@ -134,6 +134,20 @@ window.common = (function(global) {
|
||||
(location.search || location.hash).replace(queryRegex, ''),
|
||||
'run'
|
||||
);
|
||||
},
|
||||
removeCodeUri: function(location, history) {
|
||||
if (
|
||||
typeof location.href.split !== 'function' ||
|
||||
typeof history.replaceState !== 'function'
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
history.replaceState(
|
||||
history.state,
|
||||
null,
|
||||
location.href.split('#')[0]
|
||||
);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user