From d00c336a55d1dd047cdb778cb44ae441ea6b842e Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Thu, 2 Feb 2017 21:19:35 -0800 Subject: clean up editor HTML when posting to Micropub endpoint closes #67 --- controllers/editor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'controllers') 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( -- cgit v1.2.3