Skip to content

Commit 7fb6d47

Browse files
committed
Add Markdown import feature, fix backslash preview bug
- Add "Import Markdown" button in sidebar Tools panel - Side-by-side modal with live Markdown→Djot conversion - Converts: bold, italic, strikethrough, highlight, headers, links, etc. - Inserts at cursor position with proper blank lines - Fix REST API preview stripping backslashes (removed unnecessary wp_unslash)
1 parent c21c489 commit 7fb6d47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Blocks/DjotBlock.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public function registerRestRoute(): void
8686
// which breaks raw HTML blocks. Security is handled by:
8787
// 1. permission_callback requiring edit_posts capability
8888
// 2. Profile-based feature restrictions in the converter
89-
'sanitize_callback' => static fn (string $value): string => wp_unslash($value),
89+
// Note: No sanitization needed - apiFetch sends JSON which
90+
// doesn't have WordPress magic quotes issues
9091
],
9192
],
9293
]);

0 commit comments

Comments
 (0)