Skip to content

Commit

Permalink
Fix error of decoding base64-string containing Cyrillic characters in…
Browse files Browse the repository at this point in the history
… SimpleMDE.
  • Loading branch information
ega22a committed Oct 12, 2024
1 parent 2053528 commit 3247c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/js/controllers/simplemde_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class extends ApplicationController {
title: 'Insert Horizontal Line',
},
],
initialValue: atob(this.textValue),
initialValue: decodeURIComponent(atob(this.textValue).split('').map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join('')),
placeholder: this.textarea.placeholder,
spellChecker: false,
});
Expand Down

0 comments on commit 3247c22

Please sign in to comment.