Unsanitize content on new and edit pages

This commit is contained in:
Diego Najar 2018-02-07 20:15:33 +01:00
parent 6883836faf
commit 8b237f818b
1 changed files with 10 additions and 0 deletions

View File

@ -276,6 +276,11 @@ class pluginAPI extends Plugin {
private function createPage($args)
{
// Unsanitize content because all values are sanitized
if (isset($args['content'])) {
$args['content'] = Text::htmlDecode($args['content']);
}
// This function is defined on functions.php
$key = createPage($args);
@ -295,6 +300,11 @@ class pluginAPI extends Plugin {
private function editPage($key, $args)
{
// Unsanitize content because all values are sanitized
if (isset($args['content'])) {
$args['content'] = Text::htmlDecode($args['content']);
}
$args['key'] = $key;
$newKey = editPage($args);