summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'controllers')
-rw-r--r--controllers/editor.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/controllers/editor.php b/controllers/editor.php
index 81703f6..9016d1d 100644
--- a/controllers/editor.php
+++ b/controllers/editor.php
@@ -14,8 +14,11 @@ $app->post('/editor/publish', function() use($app) {
$content = $params['body'];
+ // Clean up the HTML from the editor
+ $content = sanitize_editor_html($content);
+
if($user->micropub_optin_html_content) {
- $content = ['html' => $params['body']];
+ $content = ['html' => $content];
}
$micropub_request = array(