summaryrefslogtreecommitdiff
path: root/controllers/editor.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-02-02 21:19:35 -0800
committerAaron Parecki <aaron@parecki.com>2017-02-02 21:19:35 -0800
commitd00c336a55d1dd047cdb778cb44ae441ea6b842e (patch)
tree95411b6ae52c1166fe60ecfc6eb19ef6c21d1f87 /controllers/editor.php
parent61a80c5a2c1cd3ee6fb53602e20d6c0c832c9138 (diff)
clean up editor HTML when posting to Micropub endpoint
closes #67
Diffstat (limited to 'controllers/editor.php')
-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(