summaryrefslogtreecommitdiff
path: root/modules/book.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-02-26 22:02:46 +0000
committerDries Buytaert <dries@buytaert.net>2003-02-26 22:02:46 +0000
commit8ae2520965d977d7ee7ff9665f9227935e7bdbd7 (patch)
tree6a69ac5814abde18646545e2f1b650d51b204dfc /modules/book.module
parentf44fe74058f1bd4a4c465a3d237d58b72c42fa16 (diff)
downloadbrdo-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/book.module')
-rw-r--r--modules/book.module20
1 files changed, 3 insertions, 17 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();