diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-02-26 22:02:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-02-26 22:02:46 +0000 |
commit | 8ae2520965d977d7ee7ff9665f9227935e7bdbd7 (patch) | |
tree | 6a69ac5814abde18646545e2f1b650d51b204dfc /modules | |
parent | f44fe74058f1bd4a4c465a3d237d58b72c42fa16 (diff) | |
download | brdo-8ae2520965d977d7ee7ff9665f9227935e7bdbd7.tar.gz brdo-8ae2520965d977d7ee7ff9665f9227935e7bdbd7.tar.bz2 |
- Removed stripslashes(). See http://lists.drupal.org/pipermail/drupal-devel/2003-February/022233.html. Patch by Ax.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 20 | ||||
-rw-r--r-- | modules/book/book.module | 20 |
2 files changed, 6 insertions, 34 deletions
diff --git a/modules/book.module b/modules/book.module index 34fca8ab3..31182a3a8 100644 --- a/modules/book.module +++ b/modules/book.module @@ -200,12 +200,6 @@ function book_form(&$node, &$help, &$error) { $output = form_select(t("Parent"), "parent", $node->parent, book_toc(), t("The parent subject or category the page belongs in.")); - if ($node->format) { - if ($op != t("Preview")) { - $node->body = addslashes($node->body); - } - } - if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("book", $node)); } @@ -341,17 +335,9 @@ function book_body($node) { global $op; if ($node->format == 1) { - /* - ** Make sure only authorized users can preview PHP pages. - */ - - if ($op == t("Preview")) { - if (user_access("create php content")) { - $node->body = stripslashes($node->body); // see also book_form() - } - else { - return; - } + // Make sure only authorized users can preview PHP pages. + if ($op == t("Preview") && !user_access("create php content")) { + return; } ob_start(); diff --git a/modules/book/book.module b/modules/book/book.module index 34fca8ab3..31182a3a8 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -200,12 +200,6 @@ function book_form(&$node, &$help, &$error) { $output = form_select(t("Parent"), "parent", $node->parent, book_toc(), t("The parent subject or category the page belongs in.")); - if ($node->format) { - if ($op != t("Preview")) { - $node->body = addslashes($node->body); - } - } - if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("book", $node)); } @@ -341,17 +335,9 @@ function book_body($node) { global $op; if ($node->format == 1) { - /* - ** Make sure only authorized users can preview PHP pages. - */ - - if ($op == t("Preview")) { - if (user_access("create php content")) { - $node->body = stripslashes($node->body); // see also book_form() - } - else { - return; - } + // Make sure only authorized users can preview PHP pages. + if ($op == t("Preview") && !user_access("create php content")) { + return; } ob_start(); |