mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +02:00
Drop deprecated escape
and unescape
(#217)
This commit is contained in:
committed by
Ian Storm Taylor
parent
5825db3caa
commit
5a92083686
@@ -10,7 +10,7 @@ import Raw from './raw'
|
||||
|
||||
function encode(object) {
|
||||
const string = JSON.stringify(object)
|
||||
const encoded = window.btoa(window.unescape(window.encodeURIComponent(string)))
|
||||
const encoded = window.btoa(window.encodeURIComponent(string))
|
||||
return encoded
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ function encode(object) {
|
||||
*/
|
||||
|
||||
function decode(string) {
|
||||
const decoded = window.decodeURIComponent(window.escape(window.atob(string)))
|
||||
const decoded = window.decodeURIComponent(window.atob(string))
|
||||
const object = JSON.parse(decoded)
|
||||
return object
|
||||
}
|
||||
|
Reference in New Issue
Block a user