decoding from local storage bug fix

main
Mike Fix 6 years ago
parent 0441205217
commit 20f9b5aa82

@ -99,7 +99,9 @@ class Editor extends React.Component {
}
// Makes sure the slash in encoded in application/X is decoded
if (newState.language) {
newState.language = unescapeHtml(newState.language)
}
this.setState(newState)

@ -20,7 +20,6 @@ export const escapeHtml = s => {
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\//g, '&#x2F;')
.replace(/&/g, '&amp;')
}
}
@ -30,7 +29,6 @@ export const unescapeHtml = s => {
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&#x2F;/g, '/')
.replace(/&amp;/g, '&');
}
}

Loading…
Cancel
Save