Skip to content

Commit

Permalink
Fixed incorrect parsing of HTML in SimpleMDE field
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Oct 11, 2024
1 parent 2d6d64a commit b56de9b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions public/css/orchid.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/css/orchid.rtl.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions public/js/orchid.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/vendor.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions public/mix-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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: JSON.parse(this.textValue),
initialValue: atob(this.textValue),
placeholder: this.textarea.placeholder,
spellChecker: false,
});
Expand Down
2 changes: 1 addition & 1 deletion resources/views/fields/simplemde.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@component($typeForm, get_defined_vars())
<div class="simplemde-wrapper" data-controller="simplemde"
data-simplemde-text-value='@json($attributes['value'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)'>
data-simplemde-text-value="{{ base64_encode($attributes['value']) }}">
<textarea {{ $attributes }}></textarea>
<input class="d-none upload" type="file" data-action="simplemde#upload">
</div>
Expand Down

0 comments on commit b56de9b

Please sign in to comment.