summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-11-18 13:21:35 +0000
committerDries Buytaert <dries@buytaert.net>2001-11-18 13:21:35 +0000
commite7e104e82f3def8136c91337a19ce0cc3e451f64 (patch)
tree569430b15c270e8d819a3f580c1f2c6cefac448f /modules/node.module
parent0222ee66667fcfb212b698c0a51a32993868e6bc (diff)
downloadbrdo-e7e104e82f3def8136c91337a19ce0cc3e451f64.tar.gz
brdo-e7e104e82f3def8136c91337a19ce0cc3e451f64.tar.bz2
- node system:
+ Made the filters work again! + There is one strange thing that I can't track down though: for some reason, "^M" characters (?) are padded after newline ("\n" and / or "\r") characters.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/node.module b/modules/node.module
index f0b0a5111..ecbc2dfce 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -90,7 +90,7 @@ function node_filter_link($text) {
function node_filter($text) {
if (variable_get("filter_html", 0)) $text = node_filter_html($text);
if (variable_get("filter_link", 0)) $text = node_filter_link($text);
- return $text;
+ return trim($text);
}
function node_link($type, $node = 0) {
@@ -672,10 +672,18 @@ function node_preview($edit) {
}
/*
+ ** Apply the required filters:
+ */
+
+ foreach ($edit as $key => $value) {
+ $node->$key = check_input($value);
+ }
+
+ /*
** Display a preview of the node:
*/
- node_view($edit);
+ node_view($node);
return node_form($edit);
}