1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 02:19:52 +02:00

Drop deprecated escape and unescape (#217)

This commit is contained in:
Djamil Legato
2016-08-04 11:20:08 -07:00
committed by Ian Storm Taylor
parent 5825db3caa
commit 5a92083686

View File

@@ -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
}