public static function validatePostMarkup($core, $get, $post) { if (!isset($post['excerpt'])) { throw new Exception('No entry excerpt'); } if (!isset($post['content'])) { throw new Exception('No entry content'); } if (empty($post['format'])) { throw new Exception('No entry format'); } if (!isset($post['lang'])) { throw new Exception('No entry lang'); } $excerpt = $post['excerpt']; $excerpt_xhtml = ''; $content = $post['content']; $content_xhtml = ''; $format = $post['format']; $lang = $post['lang']; $core->blog->setPostContent(0, $format, $lang, $excerpt, $excerpt_xhtml, $content, $content_xhtml); $rsp = new xmlTag('result'); $v = htmlValidator::validate($excerpt_xhtml . $content_xhtml); $rsp->valid($v['valid']); $rsp->errors($v['errors']); return $rsp; }