From de95001c9291d6f2e66374975b793f84dc155aca Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Tue, 31 Dec 2002 12:34:07 +0000
Subject: [PATCH] - Tidied up the use of check_output().  Might make rendering
 pages a bit   snappier (performance improvement).

---
 admin.php                            |  2 +-
 includes/common.inc                  |  2 +-
 includes/theme.inc                   |  8 ++++----
 misc/admin.css                       |  2 +-
 modules/aggregator.module            | 24 ++++++++++++------------
 modules/aggregator/aggregator.module | 24 ++++++++++++------------
 modules/block.module                 |  4 ++--
 modules/block/block.module           |  4 ++--
 modules/book.module                  | 20 ++++++++++----------
 modules/book/book.module             | 20 ++++++++++----------
 modules/comment.module               | 12 ++++++------
 modules/comment/comment.module       | 12 ++++++------
 modules/forum.module                 | 16 ++++++++--------
 modules/forum/forum.module           | 16 ++++++++--------
 modules/import.module                | 24 ++++++++++++------------
 modules/locale.module                |  8 ++++----
 modules/locale/locale.module         |  8 ++++----
 modules/node.module                  |  6 +++---
 modules/node/node.module             |  6 +++---
 modules/queue.module                 |  6 +++---
 modules/search.module                |  4 ++--
 modules/search/search.module         |  4 ++--
 modules/statistics.module            |  6 +++---
 modules/statistics/statistics.module |  6 +++---
 modules/taxonomy.module              |  2 +-
 modules/taxonomy/taxonomy.module     |  2 +-
 modules/tracker.module               |  4 ++--
 modules/tracker/tracker.module       |  4 ++--
 modules/user.module                  | 20 ++++++++++----------
 modules/user/user.module             | 20 ++++++++++----------
 modules/watchdog.module              | 12 ++++++------
 modules/watchdog/watchdog.module     | 12 ++++++------
 node.php                             |  4 ++--
 themes/goofy/goofy.theme             | 10 +++++-----
 themes/marvin/marvin.theme           | 10 +++++-----
 themes/unconed/unconed.theme         | 10 +++++-----
 36 files changed, 177 insertions(+), 177 deletions(-)

diff --git a/admin.php b/admin.php
index fc49e9a51577..3e232645bdba 100644
--- a/admin.php
+++ b/admin.php
@@ -41,8 +41,8 @@ function admin_page($mod) {
       ** Body:
       */
 
-      print "<div id=\"main\">";
       print "<a href=\"http://drupal.org/\"><img align=\"right\" src=\"misc/druplicon-small.gif\" alt=\"Druplicon - Drupal logo\" border=\"0\" /></a>";
+      print "<div id=\"main\">";
 
       if ($path = menu_path()) {
         print "<h2>". la(t("Administration")) ." &gt; $path</h2>";
diff --git a/includes/common.inc b/includes/common.inc
index 4255b0e31cf7..db5bc4591427 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -457,7 +457,7 @@ function filter($text) {
   return $text;
 }
 
-function check_output($text, $nl2br = 0) {
+function check_output($text) {
   if ($text) {
     $text = stripslashes($text);
 
diff --git a/includes/theme.inc b/includes/theme.inc
index 11b1877a4bdf..46811a331f93 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -46,15 +46,15 @@ function node($node, $main) {
       }
     }
 
-    $output = "<b>". check_output($node->title) ."</b> by ". format_name($node) ."<br />";
+    $output = "<b>$node->title</b> by ". format_name($node) ."<br />";
     if (count($terms)) {
       $output .= "<small>(". $this->links($terms) .")</small><br />";
     }
     if ($main && $node->teaser) {
-      $output .= check_output($node->teaser, 1);
+      $output .= check_output($node->teaser);
     }
     else {
-      $output .= check_output($node->body, 1);
+      $output .= check_output($node->body);
     }
     if ($links = link_node($node, $main)) {
       $output .= "<br />[ ". $this->links($links) ." ]";
@@ -65,7 +65,7 @@ function node($node, $main) {
   }
 
   function box($subject, $content, $region = "main") {
-    $output = "<b>". check_output($subject) ."</b><br />". check_output($content) ."<p />";
+    $output = "<b>$subject</b><br />$content<p />";
     print $output;
   }
 
diff --git a/misc/admin.css b/misc/admin.css
index 79b06bb58664..e1ba4c561088 100644
--- a/misc/admin.css
+++ b/misc/admin.css
@@ -48,7 +48,7 @@ td {
 }
 hr {
   margin: .5em 0;
-  height: 1px; 
+  height: 1px;
   color: #ccc;
 }
 #menu {
diff --git a/modules/aggregator.module b/modules/aggregator.module
index 5243ea6dce3e..a679780cb35f 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -67,7 +67,7 @@ function import_format_item($item, $feed = 0) {
   }
 
   // external link
-  $output .= "<a href=\"". check_output($item->link) ."\" target=\"new\">". check_output($item->title) ."</a>";
+  $output .= "<a href=\"$item->link\" target=\"new\">$item->title</a>";
 
   return $output ."<br />";
 }
@@ -387,7 +387,7 @@ function import_view() {
   $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
   unset($rows);
   while ($feed = db_fetch_object($result)) {
-    $rows[] = array(check_output($feed->title), check_output($feed->attributes), format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)));
+    $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)));
   }
   $output .= table($header, $rows);
 
@@ -398,7 +398,7 @@ function import_view() {
   $header = array(t("title"), t("attributes"), t("operations"));
   unset($rows);
   while ($bundle = db_fetch_object($result)) {
-    $rows[] = array(check_output($bundle->title), check_output($bundle->attributes), la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)));
+    $rows[] = array($bundle->title, $bundle->attributes, la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)));
   }
   $output .= table($header, $rows);
 
@@ -411,7 +411,7 @@ function import_tag() {
 
   $header = array(t("date"), t("feed"), t("news item"));
   while ($item = db_fetch_object($result)) {
-    $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "<a href=\"". check_output($item->link) ."\">". check_output($item->title) ."</a>". ($item->description ? "<br /><small><i>". check_output($item->description, 1) ."</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
+    $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la($item->feed, array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "<a href=\"$item->link\">$item->title</a>". ($item->description ? "<br /><small><i>$item->description</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
   }
 
   $output .= table($header, $rows);
@@ -511,7 +511,7 @@ function import_page_last() {
     }
 
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -530,7 +530,7 @@ function import_page_feed($fid) {
   $feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
 
   $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
-  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div></p>";
+  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">$feed->description</div></p>";
   $header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ."<a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" /></a><br /><br /></div></p>\n";
 
   $result = db_query("SELECT * FROM item WHERE fid = '%s' ORDER BY iid DESC LIMIT ". variable_get("import_page_limit", 75), $fid);
@@ -546,7 +546,7 @@ function import_page_feed($fid) {
       $output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
     }
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -555,7 +555,7 @@ function import_page_feed($fid) {
 
   $theme->header();
   $theme->box(t("News feeds"), import_page_info());
-  $theme->box(check_output($feed->title), $header);
+  $theme->box($feed->title, $header);
   $theme->box(t("Latest news"), $output);
   $theme->footer();
 }
@@ -566,7 +566,7 @@ function import_page_bundle($bid) {
   $bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
 
   $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". lm($bundle->title, array("mod" => "import", "op" => "bundle", "id" => $bundle->bid)) ."</div></p>";
-  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." ". check_output($bundle->attributes) .".</div></p>";
+  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." $bundle->attributes.</div></p>";
 
   $keys = explode(",", $bundle->attributes);
   foreach ($keys as $key) $where[] = "i.attributes LIKE '%". trim($key) ."%'";
@@ -585,7 +585,7 @@ function import_page_bundle($bid) {
     }
 
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -594,7 +594,7 @@ function import_page_bundle($bid) {
 
   $theme->header();
   $theme->box(t("News feeds"), import_page_info());
-  $theme->box(check_output($bundle->title), $header);
+  $theme->box($bundle->title, $header);
   $theme->box(t("Latest news"), $output);
   $theme->footer();
 
@@ -607,7 +607,7 @@ function import_page_sources() {
 
   while ($feed = db_fetch_object($result)) {
     $output .= lm($feed->title, array("mod" => "import", "op" => "feed", "id" => $feed->fid));
-    $output .= "<div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div><br />";
+    $output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
   }
 
   $output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), "", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />\n";
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 5243ea6dce3e..a679780cb35f 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -67,7 +67,7 @@ function import_format_item($item, $feed = 0) {
   }
 
   // external link
-  $output .= "<a href=\"". check_output($item->link) ."\" target=\"new\">". check_output($item->title) ."</a>";
+  $output .= "<a href=\"$item->link\" target=\"new\">$item->title</a>";
 
   return $output ."<br />";
 }
@@ -387,7 +387,7 @@ function import_view() {
   $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
   unset($rows);
   while ($feed = db_fetch_object($result)) {
-    $rows[] = array(check_output($feed->title), check_output($feed->attributes), format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)));
+    $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)));
   }
   $output .= table($header, $rows);
 
@@ -398,7 +398,7 @@ function import_view() {
   $header = array(t("title"), t("attributes"), t("operations"));
   unset($rows);
   while ($bundle = db_fetch_object($result)) {
-    $rows[] = array(check_output($bundle->title), check_output($bundle->attributes), la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)));
+    $rows[] = array($bundle->title, $bundle->attributes, la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)));
   }
   $output .= table($header, $rows);
 
@@ -411,7 +411,7 @@ function import_tag() {
 
   $header = array(t("date"), t("feed"), t("news item"));
   while ($item = db_fetch_object($result)) {
-    $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "<a href=\"". check_output($item->link) ."\">". check_output($item->title) ."</a>". ($item->description ? "<br /><small><i>". check_output($item->description, 1) ."</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
+    $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la($item->feed, array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "<a href=\"$item->link\">$item->title</a>". ($item->description ? "<br /><small><i>$item->description</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
   }
 
   $output .= table($header, $rows);
@@ -511,7 +511,7 @@ function import_page_last() {
     }
 
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -530,7 +530,7 @@ function import_page_feed($fid) {
   $feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
 
   $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
-  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div></p>";
+  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">$feed->description</div></p>";
   $header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ."<a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" /></a><br /><br /></div></p>\n";
 
   $result = db_query("SELECT * FROM item WHERE fid = '%s' ORDER BY iid DESC LIMIT ". variable_get("import_page_limit", 75), $fid);
@@ -546,7 +546,7 @@ function import_page_feed($fid) {
       $output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
     }
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -555,7 +555,7 @@ function import_page_feed($fid) {
 
   $theme->header();
   $theme->box(t("News feeds"), import_page_info());
-  $theme->box(check_output($feed->title), $header);
+  $theme->box($feed->title, $header);
   $theme->box(t("Latest news"), $output);
   $theme->footer();
 }
@@ -566,7 +566,7 @@ function import_page_bundle($bid) {
   $bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
 
   $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". lm($bundle->title, array("mod" => "import", "op" => "bundle", "id" => $bundle->bid)) ."</div></p>";
-  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." ". check_output($bundle->attributes) .".</div></p>";
+  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." $bundle->attributes.</div></p>";
 
   $keys = explode(",", $bundle->attributes);
   foreach ($keys as $key) $where[] = "i.attributes LIKE '%". trim($key) ."%'";
@@ -585,7 +585,7 @@ function import_page_bundle($bid) {
     }
 
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -594,7 +594,7 @@ function import_page_bundle($bid) {
 
   $theme->header();
   $theme->box(t("News feeds"), import_page_info());
-  $theme->box(check_output($bundle->title), $header);
+  $theme->box($bundle->title, $header);
   $theme->box(t("Latest news"), $output);
   $theme->footer();
 
@@ -607,7 +607,7 @@ function import_page_sources() {
 
   while ($feed = db_fetch_object($result)) {
     $output .= lm($feed->title, array("mod" => "import", "op" => "feed", "id" => $feed->fid));
-    $output .= "<div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div><br />";
+    $output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
   }
 
   $output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), "", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />\n";
diff --git a/modules/block.module b/modules/block.module
index 2fcd5d1ea0f7..4176bd17196f 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -62,13 +62,13 @@ function block_block($op = "list", $delta = 0) {
   if ($op == "list") {
     $result = db_query("SELECT bid, title, info FROM boxes ORDER BY title");
     while ($block = db_fetch_object($result)) {
-      $blocks[$block->bid]["info"] = check_output($block->info);
+      $blocks[$block->bid]["info"] = $block->info;
     }
     return $blocks;
   }
   else {
     $block = db_fetch_object(db_query("SELECT * FROM boxes WHERE bid = '%d'", $delta));
-    $data["subject"] = check_output($block->title);
+    $data["subject"] = $block->title;
     $data["content"] = ($block->type == 1) ? eval($block->body) : $block->body;
     return $data;
   }
diff --git a/modules/block/block.module b/modules/block/block.module
index 2fcd5d1ea0f7..4176bd17196f 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -62,13 +62,13 @@ function block_block($op = "list", $delta = 0) {
   if ($op == "list") {
     $result = db_query("SELECT bid, title, info FROM boxes ORDER BY title");
     while ($block = db_fetch_object($result)) {
-      $blocks[$block->bid]["info"] = check_output($block->info);
+      $blocks[$block->bid]["info"] = $block->info;
     }
     return $blocks;
   }
   else {
     $block = db_fetch_object(db_query("SELECT * FROM boxes WHERE bid = '%d'", $delta));
-    $data["subject"] = check_output($block->title);
+    $data["subject"] = $block->title;
     $data["content"] = ($block->type == 1) ? eval($block->body) : $block->body;
     return $data;
   }
diff --git a/modules/book.module b/modules/book.module
index 4387490f1801..d79adb810917 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -123,7 +123,7 @@ function book_link($type, $node = 0, $main = 0) {
 
     $result = db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 ORDER BY b.weight, n.title");
     while ($book = db_fetch_object($result)) {
-      menu_add("administer book '". check_output($book->title) ."'", "admin.php?mod=book&op=view&id=$book->nid", "Display a book outline.", NULL, "collaborative books");
+      menu_add("administer book '$book->title'", "admin.php?mod=book&op=view&id=$book->nid", "Display a book outline.", NULL, "collaborative books");
     }
   }
 
@@ -360,7 +360,7 @@ function book_body($node) {
     ob_end_clean();
   }
   else {
-    $output = check_output(filter($node->body), 1);
+    $output = check_output(filter($node->body));
   }
 
   return $output;
@@ -419,7 +419,7 @@ function book_view($node, $main = 0) {
 
       $output .= " <tr><td colspan=\"3\">$location</td></tr>";
       $output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
-      $output .= " <tr><td colspan=\"3\"><b><big>". check_output($node->title) ."</big></b>". ($node->body ? "<br /><small><i>". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->created))) ."</i></small> " : "") ."</td></tr>";
+      $output .= " <tr><td colspan=\"3\"><b><big>$node->title</big></b>". ($node->body ? "<br /><small><i>". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->created))) ."</i></small> " : "") ."</td></tr>";
     }
 
     if ($node->body) {
@@ -436,7 +436,7 @@ function book_view($node, $main = 0) {
 
     $output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
     $output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? l(t("previous"), array("id" => $prev->nid), "node", "", array("title" => t("View the previous page in this book."))) : t("previous")) ."</td><td align=\"center\" width=\"34%\">". lm(t("index"), array("mod" => "book"), "", array("title" => t("View this book's table of contents."))) ."</td><td align=\"right\" width=\"33%\">". ($next ? l(t("next"), array("id" => $next->nid), "node", "", array("title" => t("View the next page in this book."))) : t("next")) ."</td></tr>";
-    $output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>". check_output($prev->title) ."</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), "node", "", array("title" => t("View this page's parent section."))) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>". check_output($next->title) ."</small>" : "&nbsp;") ."</td></tr>";
+    $output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>$prev->title</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), "node", "", array("title" => t("View this page's parent section."))) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>$next->title</small>" : "&nbsp;") ."</td></tr>";
     $output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
     $output .= " <tr><td colspan=\"3\" align=\"right\"><div style=\"margin: 10 10 10 10;\">". $theme->links(link_node($node, $main)) ."</div></td></tr>";
     $output .= "</table>";
@@ -491,7 +491,7 @@ function book_tree_recurse($nid, $depth, $children) {
   if ($depth > 0) {
     if ($children[$nid]) {
       foreach ($children[$nid] as $foo => $node) {
-        $output .= "<li>". l(check_output($node->title), array("id" => $node->nid)) ."</li>";
+        $output .= "<li>". l($node->title, array("id" => $node->nid)) ."</li>";
 
         if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
           $output .= "<ul>$tree</ul>";
@@ -537,7 +537,7 @@ function book_render() {
 
     if ($node) {
       // output the content:
-      $output .= "<dt>". l(check_output($node->title), array("id" => $node->nid)) ."</dt><dd>". book_body($node) ."<br /><br /></dd>";
+      $output .= "<dt>". l($node->title, array("id" => $node->nid)) ."</dt><dd>". book_body($node) ."<br /><br /></dd>";
     }
   }
 
@@ -579,7 +579,7 @@ function book_print($id = "", $depth = 1) {
 
     if ($node) {
       // output the content:
-      $output .= "<h$depth>". check_output($node->title) ."</h$depth>";
+      $output .= "<h$depth>$node->title</h$depth>";
 
       if ($node->body) {
         $output .= "<ul>". book_body($node) ."</ul>";
@@ -606,7 +606,7 @@ function book_print_recurse($parent = "", $depth = 1) {
 
     if ($node) {
       // output the content:
-      $output .= "<h$depth>". check_output($node->title) ."</h$depth>";
+      $output .= "<h$depth>$node->title</h$depth>";
 
       if ($node->body) {
         $output .= "<ul>". book_body($node) ."</ul>";
@@ -652,7 +652,7 @@ function book_admin_view($nid, $depth = 0) {
 
   $node = node_load(array("nid" => $nid));
 
-  $output .= "<h3>". check_output($node->title) ."</h3>";
+  $output .= "<h3>$node->title</h3>";
   $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
   $output .= " <tr><th>title</th><th>weight</th><th colspan=\"3\">operations</th></tr>";
   $output .= book_admin_view_line($node);
@@ -707,7 +707,7 @@ function book_admin_orphan() {
     $output .= " <tr><th>title</th><th colspan=\"2\">operations</th></tr>";
     foreach ($pages as $nid => $node) {
       if ($node->parent && empty($pages[$node->parent])) {
-        $output .= "<tr><td>". l(check_output($node->title), array("id" => $node->nid)) ."</td><td>". la(t("edit page"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."</td><td>". la(t("delete page"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."</td>";
+        $output .= "<tr><td>". l($node->title, array("id" => $node->nid)) ."</td><td>". la(t("edit page"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."</td><td>". la(t("delete page"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."</td>";
       }
     }
     $output .= "</table>";
diff --git a/modules/book/book.module b/modules/book/book.module
index 4387490f1801..d79adb810917 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -123,7 +123,7 @@ function book_link($type, $node = 0, $main = 0) {
 
     $result = db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 ORDER BY b.weight, n.title");
     while ($book = db_fetch_object($result)) {
-      menu_add("administer book '". check_output($book->title) ."'", "admin.php?mod=book&op=view&id=$book->nid", "Display a book outline.", NULL, "collaborative books");
+      menu_add("administer book '$book->title'", "admin.php?mod=book&op=view&id=$book->nid", "Display a book outline.", NULL, "collaborative books");
     }
   }
 
@@ -360,7 +360,7 @@ function book_body($node) {
     ob_end_clean();
   }
   else {
-    $output = check_output(filter($node->body), 1);
+    $output = check_output(filter($node->body));
   }
 
   return $output;
@@ -419,7 +419,7 @@ function book_view($node, $main = 0) {
 
       $output .= " <tr><td colspan=\"3\">$location</td></tr>";
       $output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
-      $output .= " <tr><td colspan=\"3\"><b><big>". check_output($node->title) ."</big></b>". ($node->body ? "<br /><small><i>". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->created))) ."</i></small> " : "") ."</td></tr>";
+      $output .= " <tr><td colspan=\"3\"><b><big>$node->title</big></b>". ($node->body ? "<br /><small><i>". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->created))) ."</i></small> " : "") ."</td></tr>";
     }
 
     if ($node->body) {
@@ -436,7 +436,7 @@ function book_view($node, $main = 0) {
 
     $output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
     $output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? l(t("previous"), array("id" => $prev->nid), "node", "", array("title" => t("View the previous page in this book."))) : t("previous")) ."</td><td align=\"center\" width=\"34%\">". lm(t("index"), array("mod" => "book"), "", array("title" => t("View this book's table of contents."))) ."</td><td align=\"right\" width=\"33%\">". ($next ? l(t("next"), array("id" => $next->nid), "node", "", array("title" => t("View the next page in this book."))) : t("next")) ."</td></tr>";
-    $output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>". check_output($prev->title) ."</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), "node", "", array("title" => t("View this page's parent section."))) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>". check_output($next->title) ."</small>" : "&nbsp;") ."</td></tr>";
+    $output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>$prev->title</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), "node", "", array("title" => t("View this page's parent section."))) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>$next->title</small>" : "&nbsp;") ."</td></tr>";
     $output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
     $output .= " <tr><td colspan=\"3\" align=\"right\"><div style=\"margin: 10 10 10 10;\">". $theme->links(link_node($node, $main)) ."</div></td></tr>";
     $output .= "</table>";
@@ -491,7 +491,7 @@ function book_tree_recurse($nid, $depth, $children) {
   if ($depth > 0) {
     if ($children[$nid]) {
       foreach ($children[$nid] as $foo => $node) {
-        $output .= "<li>". l(check_output($node->title), array("id" => $node->nid)) ."</li>";
+        $output .= "<li>". l($node->title, array("id" => $node->nid)) ."</li>";
 
         if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
           $output .= "<ul>$tree</ul>";
@@ -537,7 +537,7 @@ function book_render() {
 
     if ($node) {
       // output the content:
-      $output .= "<dt>". l(check_output($node->title), array("id" => $node->nid)) ."</dt><dd>". book_body($node) ."<br /><br /></dd>";
+      $output .= "<dt>". l($node->title, array("id" => $node->nid)) ."</dt><dd>". book_body($node) ."<br /><br /></dd>";
     }
   }
 
@@ -579,7 +579,7 @@ function book_print($id = "", $depth = 1) {
 
     if ($node) {
       // output the content:
-      $output .= "<h$depth>". check_output($node->title) ."</h$depth>";
+      $output .= "<h$depth>$node->title</h$depth>";
 
       if ($node->body) {
         $output .= "<ul>". book_body($node) ."</ul>";
@@ -606,7 +606,7 @@ function book_print_recurse($parent = "", $depth = 1) {
 
     if ($node) {
       // output the content:
-      $output .= "<h$depth>". check_output($node->title) ."</h$depth>";
+      $output .= "<h$depth>$node->title</h$depth>";
 
       if ($node->body) {
         $output .= "<ul>". book_body($node) ."</ul>";
@@ -652,7 +652,7 @@ function book_admin_view($nid, $depth = 0) {
 
   $node = node_load(array("nid" => $nid));
 
-  $output .= "<h3>". check_output($node->title) ."</h3>";
+  $output .= "<h3>$node->title</h3>";
   $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
   $output .= " <tr><th>title</th><th>weight</th><th colspan=\"3\">operations</th></tr>";
   $output .= book_admin_view_line($node);
@@ -707,7 +707,7 @@ function book_admin_orphan() {
     $output .= " <tr><th>title</th><th colspan=\"2\">operations</th></tr>";
     foreach ($pages as $nid => $node) {
       if ($node->parent && empty($pages[$node->parent])) {
-        $output .= "<tr><td>". l(check_output($node->title), array("id" => $node->nid)) ."</td><td>". la(t("edit page"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."</td><td>". la(t("delete page"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."</td>";
+        $output .= "<tr><td>". l($node->title, array("id" => $node->nid)) ."</td><td>". la(t("edit page"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."</td><td>". la(t("delete page"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."</td>";
       }
     }
     $output .= "</table>";
diff --git a/modules/comment.module b/modules/comment.module
index 9de5302a9375..d27f36d7d882 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -45,12 +45,12 @@ function comment_user($type, $edit, &$user) {
   switch ($type) {
     case "view_public":
       if ($user->signature) {
-        return form_item(t("Signature"), check_output($user->signature, 1));
+        return form_item(t("Signature"), check_output($user->signature));
       }
       break;
     case "view_private":
       if ($user->signature) {
-        return form_item(t("Signature"), check_output($user->signature, 1));
+        return form_item(t("Signature"), check_output($user->signature));
       }
       break;
     case "edit_form":
@@ -795,7 +795,7 @@ function comment_admin_overview($status = 0) {
 
   $header = array(t("subject"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2));
   while ($comment = db_fetch_object($result)) {
-    $rows[] = array(l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid, array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (comment_is_new($comment) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)), la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)));
+    $rows[] = array(l($comment->subject, array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid, array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (comment_is_new($comment) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)), la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)));
   }
 
   if ($pager = pager_display(NULL, 50, 0, "admin")) {
@@ -1153,9 +1153,9 @@ function comment($comment, $link = 0) {
   $output .= "<a name=\"$comment->cid\"></a>";
   $output .= "<div style=\"border: 1px solid; padding: 10px;\">";
   $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
-  $output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">". check_output($comment->subject) . ($comment->new ? theme_invoke("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
+  $output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme_invoke("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
   $output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>";
-  $output .= " <tr><td colspan=\"2\">". check_output($comment->comment, 1) ."</td></tr>";
+  $output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>";
   $output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>";
   $output .= "</table>";
   $output .= "</div><br />";
@@ -1163,7 +1163,7 @@ function comment($comment, $link = 0) {
 }
 
 function comment_folded($comment) {
-  print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." ". t("by") . " " . format_name($comment) ."</small><p />";
+  print l($comment->subject, array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." ". t("by") . " " . format_name($comment) ."</small><p />";
 }
 
 function comment_flat_collapsed($comments, $threshold) {
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 9de5302a9375..d27f36d7d882 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -45,12 +45,12 @@ function comment_user($type, $edit, &$user) {
   switch ($type) {
     case "view_public":
       if ($user->signature) {
-        return form_item(t("Signature"), check_output($user->signature, 1));
+        return form_item(t("Signature"), check_output($user->signature));
       }
       break;
     case "view_private":
       if ($user->signature) {
-        return form_item(t("Signature"), check_output($user->signature, 1));
+        return form_item(t("Signature"), check_output($user->signature));
       }
       break;
     case "edit_form":
@@ -795,7 +795,7 @@ function comment_admin_overview($status = 0) {
 
   $header = array(t("subject"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2));
   while ($comment = db_fetch_object($result)) {
-    $rows[] = array(l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid, array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (comment_is_new($comment) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)), la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)));
+    $rows[] = array(l($comment->subject, array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid, array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (comment_is_new($comment) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)), la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)));
   }
 
   if ($pager = pager_display(NULL, 50, 0, "admin")) {
@@ -1153,9 +1153,9 @@ function comment($comment, $link = 0) {
   $output .= "<a name=\"$comment->cid\"></a>";
   $output .= "<div style=\"border: 1px solid; padding: 10px;\">";
   $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
-  $output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">". check_output($comment->subject) . ($comment->new ? theme_invoke("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
+  $output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme_invoke("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
   $output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>";
-  $output .= " <tr><td colspan=\"2\">". check_output($comment->comment, 1) ."</td></tr>";
+  $output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>";
   $output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>";
   $output .= "</table>";
   $output .= "</div><br />";
@@ -1163,7 +1163,7 @@ function comment($comment, $link = 0) {
 }
 
 function comment_folded($comment) {
-  print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." ". t("by") . " " . format_name($comment) ."</small><p />";
+  print l($comment->subject, array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." ". t("by") . " " . format_name($comment) ."</small><p />";
 }
 
 function comment_flat_collapsed($comments, $threshold) {
diff --git a/modules/forum.module b/modules/forum.module
index d87ad5fd11c8..dc867b28ebef 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -180,16 +180,16 @@ function forum_view($node, $main = 0) {
 
   /* TODO: find out what this code was ment to do and either use it or not.
 
-  $output .= "<p>"._forum_get_icon($node)." ".lm(check_output($voc->name), array("mod" => "forum"))." : ".lm(check_output($term_data->name), array("mod" => "forum", "tid" => $term_data->tid));
+  $output .= "<p>". _forum_get_icon($node) ." ". lm($voc->name, array("mod" => "forum")) ." : ". lm($term_data->name, array("mod" => "forum", "tid" => $term_data->tid));
 
-  $output .= " / <b>". check_output($node->title) ."</b><br>".t("%a by %b", array("%a" => format_date($node->created), "%b" => format_name($node)))."</p><p>". check_output($node->body, 1) ."</p>";
+  $output .= " / <b>$node->title</b><br>".t("%a by %b", array("%a" => format_date($node->created), "%b" => format_name($node)))."</p><p>". check_output($node->body) ."</p>";
   $output .= "<p>". $theme->links(link_node($node, $main)) ."</p>";
 
   #$theme->box(t("Discussion forum"), $output);
   */
 
   if (!$main) {
-    $node->title = _forum_get_icon($node)." ".lm(check_output($voc->name), array("mod" => "forum"))." : ".lm(check_output($term_data->name), array("mod" => "forum", "tid" => $term_data->tid)) . " / <b>". check_output($node->title) ."</b>";
+    $node->title = _forum_get_icon($node) ." ". lm($voc->name, array("mod" => "forum")) ." : ". lm($term_data->name, array("mod" => "forum", "tid" => $term_data->tid)) ." / <b>$node->title</b>";
   }
 
   $theme->node($node, $main);
@@ -568,13 +568,13 @@ function forum_forum_list($forums, $parents, $tid) {
 
     foreach ($forums as $forum) {
       if ($forum->container) {
-        $output .= " <tr><td colspan=\"5\">". lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."<br /><small>". ($forum->description ? check_output($forum->description, 1) : "") ."</small></td></tr>";
+        $output .= " <tr><td colspan=\"5\">". lm($forum->name, array("mod" => "forum", "tid" => $forum->tid)) ."<br /><small>". ($forum->description ? check_output($forum->description) : "") ."</small></td></tr>";
       }
       else {
         if ($user->uid) $new_topics = $forum->num_topics - $forum->old_topics;
         $icon = _forum_get_folder_icon($new_topics);
         $output .= " <tr><td>&nbsp;</td><td>$icon</td>";
-        $output .= "<td><table border=\"0\"><tr><td width=\"". ($forum->depth * 20) ."\">&nbsp;</td><td>".lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."<div style=\"padding-top: 5px;\">". check_output($forum->description, 1);
+        $output .= "<td><table border=\"0\"><tr><td width=\"". ($forum->depth * 20) ."\">&nbsp;</td><td>". lm($forum->name, array("mod" => "forum", "tid" => $forum->tid))."<div style=\"padding-top: 5px;\">". check_output($forum->description);
 
         $links = array();
         if ($forum->last_post) {
@@ -643,7 +643,7 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse
           <tr>
             <td>"._forum_get_folder_icon($topic->new, $topic->num_comments, $topic->comment_mode)."</td>
             <td>"._forum_get_icon($topic)."</td>
-            <td valign=\"top\">". check_output($topic->title) ."</td>
+            <td valign=\"top\">$topic->title</td>
             <td align=\"center\" valign=\"top\" colspan=\"3\">".lm(t("This topic has been moved"), array("mod" => "forum", "tid" => $topic->shadow))."</td>
           </tr>";
       }
@@ -652,7 +652,7 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse
           <tr>
             <td>"._forum_get_folder_icon($topic->new, $topic->num_comments, $topic->comment_mode)."</td>
             <td>"._forum_get_icon($topic)."</td>
-            <td valign=\"top\">".l(check_output($topic->title), array("id" => $topic->nid))."</td>
+            <td valign=\"top\">". l($topic->title, array("id" => $topic->nid))."</td>
             <td align=\"center\" valign=\"top\" nowrap=\"nowrap\">".$topic->num_comments.($topic->new_replies ? " (".t("%a new", array("%a" => $topic->new_replies)).")" : "")."</td>
             <td align=\"center\">"._forum_format($topic)."</td>
             <td align=\"center\">"._forum_format($topic->last_reply)."</td>
@@ -691,7 +691,7 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse
 
 function _forum_get_icon($node) {
   if (variable_get("forum_topic_icon_path", "") && $node->icon) {
-    return "<img src=\"".variable_get("forum_topic_icon_path", ""). check_output($node->icon)."\">";
+    return "<img src=\"". variable_get("forum_topic_icon_path", "") ."$node->icon\" />";
   }
   else {
     return "&nbsp;";
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index d87ad5fd11c8..dc867b28ebef 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -180,16 +180,16 @@ function forum_view($node, $main = 0) {
 
   /* TODO: find out what this code was ment to do and either use it or not.
 
-  $output .= "<p>"._forum_get_icon($node)." ".lm(check_output($voc->name), array("mod" => "forum"))." : ".lm(check_output($term_data->name), array("mod" => "forum", "tid" => $term_data->tid));
+  $output .= "<p>". _forum_get_icon($node) ." ". lm($voc->name, array("mod" => "forum")) ." : ". lm($term_data->name, array("mod" => "forum", "tid" => $term_data->tid));
 
-  $output .= " / <b>". check_output($node->title) ."</b><br>".t("%a by %b", array("%a" => format_date($node->created), "%b" => format_name($node)))."</p><p>". check_output($node->body, 1) ."</p>";
+  $output .= " / <b>$node->title</b><br>".t("%a by %b", array("%a" => format_date($node->created), "%b" => format_name($node)))."</p><p>". check_output($node->body) ."</p>";
   $output .= "<p>". $theme->links(link_node($node, $main)) ."</p>";
 
   #$theme->box(t("Discussion forum"), $output);
   */
 
   if (!$main) {
-    $node->title = _forum_get_icon($node)." ".lm(check_output($voc->name), array("mod" => "forum"))." : ".lm(check_output($term_data->name), array("mod" => "forum", "tid" => $term_data->tid)) . " / <b>". check_output($node->title) ."</b>";
+    $node->title = _forum_get_icon($node) ." ". lm($voc->name, array("mod" => "forum")) ." : ". lm($term_data->name, array("mod" => "forum", "tid" => $term_data->tid)) ." / <b>$node->title</b>";
   }
 
   $theme->node($node, $main);
@@ -568,13 +568,13 @@ function forum_forum_list($forums, $parents, $tid) {
 
     foreach ($forums as $forum) {
       if ($forum->container) {
-        $output .= " <tr><td colspan=\"5\">". lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."<br /><small>". ($forum->description ? check_output($forum->description, 1) : "") ."</small></td></tr>";
+        $output .= " <tr><td colspan=\"5\">". lm($forum->name, array("mod" => "forum", "tid" => $forum->tid)) ."<br /><small>". ($forum->description ? check_output($forum->description) : "") ."</small></td></tr>";
       }
       else {
         if ($user->uid) $new_topics = $forum->num_topics - $forum->old_topics;
         $icon = _forum_get_folder_icon($new_topics);
         $output .= " <tr><td>&nbsp;</td><td>$icon</td>";
-        $output .= "<td><table border=\"0\"><tr><td width=\"". ($forum->depth * 20) ."\">&nbsp;</td><td>".lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."<div style=\"padding-top: 5px;\">". check_output($forum->description, 1);
+        $output .= "<td><table border=\"0\"><tr><td width=\"". ($forum->depth * 20) ."\">&nbsp;</td><td>". lm($forum->name, array("mod" => "forum", "tid" => $forum->tid))."<div style=\"padding-top: 5px;\">". check_output($forum->description);
 
         $links = array();
         if ($forum->last_post) {
@@ -643,7 +643,7 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse
           <tr>
             <td>"._forum_get_folder_icon($topic->new, $topic->num_comments, $topic->comment_mode)."</td>
             <td>"._forum_get_icon($topic)."</td>
-            <td valign=\"top\">". check_output($topic->title) ."</td>
+            <td valign=\"top\">$topic->title</td>
             <td align=\"center\" valign=\"top\" colspan=\"3\">".lm(t("This topic has been moved"), array("mod" => "forum", "tid" => $topic->shadow))."</td>
           </tr>";
       }
@@ -652,7 +652,7 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse
           <tr>
             <td>"._forum_get_folder_icon($topic->new, $topic->num_comments, $topic->comment_mode)."</td>
             <td>"._forum_get_icon($topic)."</td>
-            <td valign=\"top\">".l(check_output($topic->title), array("id" => $topic->nid))."</td>
+            <td valign=\"top\">". l($topic->title, array("id" => $topic->nid))."</td>
             <td align=\"center\" valign=\"top\" nowrap=\"nowrap\">".$topic->num_comments.($topic->new_replies ? " (".t("%a new", array("%a" => $topic->new_replies)).")" : "")."</td>
             <td align=\"center\">"._forum_format($topic)."</td>
             <td align=\"center\">"._forum_format($topic->last_reply)."</td>
@@ -691,7 +691,7 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse
 
 function _forum_get_icon($node) {
   if (variable_get("forum_topic_icon_path", "") && $node->icon) {
-    return "<img src=\"".variable_get("forum_topic_icon_path", ""). check_output($node->icon)."\">";
+    return "<img src=\"". variable_get("forum_topic_icon_path", "") ."$node->icon\" />";
   }
   else {
     return "&nbsp;";
diff --git a/modules/import.module b/modules/import.module
index 5243ea6dce3e..a679780cb35f 100644
--- a/modules/import.module
+++ b/modules/import.module
@@ -67,7 +67,7 @@ function import_format_item($item, $feed = 0) {
   }
 
   // external link
-  $output .= "<a href=\"". check_output($item->link) ."\" target=\"new\">". check_output($item->title) ."</a>";
+  $output .= "<a href=\"$item->link\" target=\"new\">$item->title</a>";
 
   return $output ."<br />";
 }
@@ -387,7 +387,7 @@ function import_view() {
   $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
   unset($rows);
   while ($feed = db_fetch_object($result)) {
-    $rows[] = array(check_output($feed->title), check_output($feed->attributes), format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)));
+    $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)));
   }
   $output .= table($header, $rows);
 
@@ -398,7 +398,7 @@ function import_view() {
   $header = array(t("title"), t("attributes"), t("operations"));
   unset($rows);
   while ($bundle = db_fetch_object($result)) {
-    $rows[] = array(check_output($bundle->title), check_output($bundle->attributes), la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)));
+    $rows[] = array($bundle->title, $bundle->attributes, la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)));
   }
   $output .= table($header, $rows);
 
@@ -411,7 +411,7 @@ function import_tag() {
 
   $header = array(t("date"), t("feed"), t("news item"));
   while ($item = db_fetch_object($result)) {
-    $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "<a href=\"". check_output($item->link) ."\">". check_output($item->title) ."</a>". ($item->description ? "<br /><small><i>". check_output($item->description, 1) ."</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
+    $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la($item->feed, array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "<a href=\"$item->link\">$item->title</a>". ($item->description ? "<br /><small><i>$item->description</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
   }
 
   $output .= table($header, $rows);
@@ -511,7 +511,7 @@ function import_page_last() {
     }
 
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -530,7 +530,7 @@ function import_page_feed($fid) {
   $feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
 
   $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
-  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div></p>";
+  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">$feed->description</div></p>";
   $header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ."<a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" /></a><br /><br /></div></p>\n";
 
   $result = db_query("SELECT * FROM item WHERE fid = '%s' ORDER BY iid DESC LIMIT ". variable_get("import_page_limit", 75), $fid);
@@ -546,7 +546,7 @@ function import_page_feed($fid) {
       $output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
     }
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -555,7 +555,7 @@ function import_page_feed($fid) {
 
   $theme->header();
   $theme->box(t("News feeds"), import_page_info());
-  $theme->box(check_output($feed->title), $header);
+  $theme->box($feed->title, $header);
   $theme->box(t("Latest news"), $output);
   $theme->footer();
 }
@@ -566,7 +566,7 @@ function import_page_bundle($bid) {
   $bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
 
   $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". lm($bundle->title, array("mod" => "import", "op" => "bundle", "id" => $bundle->bid)) ."</div></p>";
-  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." ". check_output($bundle->attributes) .".</div></p>";
+  $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." $bundle->attributes.</div></p>";
 
   $keys = explode(",", $bundle->attributes);
   foreach ($keys as $key) $where[] = "i.attributes LIKE '%". trim($key) ."%'";
@@ -585,7 +585,7 @@ function import_page_bundle($bid) {
     }
 
     if ($item->description) {
-      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
+      $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
     }
 
     unset($links);
@@ -594,7 +594,7 @@ function import_page_bundle($bid) {
 
   $theme->header();
   $theme->box(t("News feeds"), import_page_info());
-  $theme->box(check_output($bundle->title), $header);
+  $theme->box($bundle->title, $header);
   $theme->box(t("Latest news"), $output);
   $theme->footer();
 
@@ -607,7 +607,7 @@ function import_page_sources() {
 
   while ($feed = db_fetch_object($result)) {
     $output .= lm($feed->title, array("mod" => "import", "op" => "feed", "id" => $feed->fid));
-    $output .= "<div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div><br />";
+    $output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
   }
 
   $output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), "", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />\n";
diff --git a/modules/locale.module b/modules/locale.module
index 0699879ac2a9..48a480affe06 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -91,7 +91,7 @@ function locale_edit($lid) {
 
   $result = db_query("SELECT * FROM locales WHERE lid = '$lid'");
   if ($translation = db_fetch_object($result)) {
-    $form .= form_item(t("Original text"), "<pre>". wordwrap(check_output($translation->string)) ."</pre>");
+    $form .= form_item(t("Original text"), "<pre>". wordwrap($translation->string) ."</pre>");
     foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128);
     $form .= form_submit(t("Save translations"));
 
@@ -102,8 +102,8 @@ function locale_edit($lid) {
 function locale_languages($translation) {
   global $languages;
 
-  foreach ($languages as $key=>$value) {
-    $output .= ($translation->$key) ? "<a href=\"#\" title=\"". check_output($translation->$key) ."\">$key</a> " : "<strike>$key</strike> ";
+  foreach ($languages as $key => $value) {
+    $output .= ($translation->$key) ? "<a href=\"#\" title=\"". $translation->$key ."\">$key</a> " : "<strike>$key</strike> ";
   }
 
   return $output;
@@ -262,7 +262,7 @@ function locale($string) {
   }
 
   if ($locale_t[$string] != "") {
-    $string = check_output($locale_t[$string]);
+    $string = $locale_t[$string];
   }
   else {
     $result = db_query("SELECT lid, $locale FROM locales WHERE string = '%s'", $string);
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 0699879ac2a9..48a480affe06 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -91,7 +91,7 @@ function locale_edit($lid) {
 
   $result = db_query("SELECT * FROM locales WHERE lid = '$lid'");
   if ($translation = db_fetch_object($result)) {
-    $form .= form_item(t("Original text"), "<pre>". wordwrap(check_output($translation->string)) ."</pre>");
+    $form .= form_item(t("Original text"), "<pre>". wordwrap($translation->string) ."</pre>");
     foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128);
     $form .= form_submit(t("Save translations"));
 
@@ -102,8 +102,8 @@ function locale_edit($lid) {
 function locale_languages($translation) {
   global $languages;
 
-  foreach ($languages as $key=>$value) {
-    $output .= ($translation->$key) ? "<a href=\"#\" title=\"". check_output($translation->$key) ."\">$key</a> " : "<strike>$key</strike> ";
+  foreach ($languages as $key => $value) {
+    $output .= ($translation->$key) ? "<a href=\"#\" title=\"". $translation->$key ."\">$key</a> " : "<strike>$key</strike> ";
   }
 
   return $output;
@@ -262,7 +262,7 @@ function locale($string) {
   }
 
   if ($locale_t[$string] != "") {
-    $string = check_output($locale_t[$string]);
+    $string = $locale_t[$string];
   }
   else {
     $result = db_query("SELECT lid, $locale FROM locales WHERE string = '%s'", $string);
diff --git a/modules/node.module b/modules/node.module
index 50e90c063810..56dbd2d2e8bb 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -30,7 +30,7 @@ function node_title_list($result, $title = NULL) {
   while ($node = db_fetch_object($result)) {
     $number = module_invoke("comment", "num_all", $node->nid);
     $name = strip_tags(format_name($node)); // required for anonymous users to work
-    $items[] = l(check_output($node->title), array("id" => $node->nid), "node", "", array("title" => t("Author: %name, comments: %number", array("%name" => $name, "%number" => $number))));
+    $items[] = l($node->title, array("id" => $node->nid), "node", "", array("title" => t("Author: %name, comments: %number", array("%name" => $name, "%number" => $number))));
   }
 
   return theme_invoke("theme_item_list", $items, $title);
@@ -496,7 +496,7 @@ function node_admin_nodes() {
   $header = array(t("title"), t("type"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2));
 
   while ($node = db_fetch_object($result)) {
-    $rows[] = array(l(check_output($node->title), array("id" => $node->nid)), module_invoke($node->type, "node", "name"), format_name($node), ($node->status ? t("published") : t("not published")), la(t("edit node"), array("mod" => "node", "op" => "edit", "id" => $node->nid)), la(t("delete node"), array("mod" => "node", "op" => "delete", "id" => $node->nid)));
+    $rows[] = array(l($node->title, array("id" => $node->nid)), module_invoke($node->type, "node", "name"), format_name($node), ($node->status ? t("published") : t("not published")), la(t("edit node"), array("mod" => "node", "op" => "edit", "id" => $node->nid)), la(t("delete node"), array("mod" => "node", "op" => "delete", "id" => $node->nid)));
   }
 
   if ($pager = pager_display(NULL, 50, 0, "admin")) {
@@ -1197,7 +1197,7 @@ function node_delete($edit) {
       $output = t("The node has been deleted.");
     }
     else {
-      $output .= form_item(t("Confirm deletion"), check_output($node->title));
+      $output .= form_item(t("Confirm deletion"), $node->title);
       $output .= form_hidden("nid", $node->nid);
       $output .= form_hidden("confirm", 1);
       $output .= form_submit(t("Delete"));
diff --git a/modules/node/node.module b/modules/node/node.module
index 50e90c063810..56dbd2d2e8bb 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -30,7 +30,7 @@ function node_title_list($result, $title = NULL) {
   while ($node = db_fetch_object($result)) {
     $number = module_invoke("comment", "num_all", $node->nid);
     $name = strip_tags(format_name($node)); // required for anonymous users to work
-    $items[] = l(check_output($node->title), array("id" => $node->nid), "node", "", array("title" => t("Author: %name, comments: %number", array("%name" => $name, "%number" => $number))));
+    $items[] = l($node->title, array("id" => $node->nid), "node", "", array("title" => t("Author: %name, comments: %number", array("%name" => $name, "%number" => $number))));
   }
 
   return theme_invoke("theme_item_list", $items, $title);
@@ -496,7 +496,7 @@ function node_admin_nodes() {
   $header = array(t("title"), t("type"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2));
 
   while ($node = db_fetch_object($result)) {
-    $rows[] = array(l(check_output($node->title), array("id" => $node->nid)), module_invoke($node->type, "node", "name"), format_name($node), ($node->status ? t("published") : t("not published")), la(t("edit node"), array("mod" => "node", "op" => "edit", "id" => $node->nid)), la(t("delete node"), array("mod" => "node", "op" => "delete", "id" => $node->nid)));
+    $rows[] = array(l($node->title, array("id" => $node->nid)), module_invoke($node->type, "node", "name"), format_name($node), ($node->status ? t("published") : t("not published")), la(t("edit node"), array("mod" => "node", "op" => "edit", "id" => $node->nid)), la(t("delete node"), array("mod" => "node", "op" => "delete", "id" => $node->nid)));
   }
 
   if ($pager = pager_display(NULL, 50, 0, "admin")) {
@@ -1197,7 +1197,7 @@ function node_delete($edit) {
       $output = t("The node has been deleted.");
     }
     else {
-      $output .= form_item(t("Confirm deletion"), check_output($node->title));
+      $output .= form_item(t("Confirm deletion"), $node->title);
       $output .= form_hidden("nid", $node->nid);
       $output .= form_hidden("confirm", 1);
       $output .= form_submit(t("Delete"));
diff --git a/modules/queue.module b/modules/queue.module
index 7cfc6f5c24c8..f27b5b56ac39 100644
--- a/modules/queue.module
+++ b/modules/queue.module
@@ -88,14 +88,14 @@ function queue_overview() {
   $output .= " <tr><th>". t("Subject") ."</th><th>". t("Author") ."</th><th>". t("Type") ."</th><th>". t("Score") ."</th></tr>";
   while ($node = db_fetch_object($result)) {
     if ($user->uid == $node->uid || field_get($node->users, $user->uid)) {
-      $output .= " <tr><td>". lm(check_output($node->title), array("mod" => "queue", "op" => "view", "id" => $node->nid)) ."</td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". module_invoke($node->type, "node", "name") ."</td><td align=\"center\">". queue_score($node->nid) ."</td></tr>";
+      $output .= " <tr><td>". lm($node->title, array("mod" => "queue", "op" => "view", "id" => $node->nid)) ."</td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". module_invoke($node->type, "node", "name") ."</td><td align=\"center\">". queue_score($node->nid) ."</td></tr>";
     }
     else {
-      $output .= " <tr><td>". lm(check_output($node->title), array("mod" => "queue", "op" => "view", "id" => $node->nid)) ."</td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". module_invoke($node->type, "node", "name") ."</td><td align=\"center\">". lm(t("vote"), array("mod" => "queue", "op" => "view", "id" => $node->nid)) ."</td></tr>";
+      $output .= " <tr><td>". lm($node->title, array("mod" => "queue", "op" => "view", "id" => $node->nid)) ."</td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". module_invoke($node->type, "node", "name") ."</td><td align=\"center\">". lm(t("vote"), array("mod" => "queue", "op" => "view", "id" => $node->nid)) ."</td></tr>";
     }
 
     if ($node->teaser) {
-      $output .= " <tr><td colspan=\"4\"><div style=\"margin-left: 40px; margin-bottom: 20px;\">". check_output($node->teaser, 1) ."</div></td></tr>";
+      $output .= " <tr><td colspan=\"4\"><div style=\"margin-left: 40px; margin-bottom: 20px;\">". check_output($node->teaser) ."</div></td></tr>";
     }
   }
   $output .= "</table>";
diff --git a/modules/search.module b/modules/search.module
index aa7a97b685bf..619c51b8e431 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -182,10 +182,10 @@ function do_search($search_array) {
       }
       switch ($type) {
       case "node":
-        $find[$i++] = array("count" => $count, "title" => check_output($title), "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "node", "type" => "node", "op" => "edit", "id" => $lno), "admin") : drupal_url(array("id" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
+        $find[$i++] = array("count" => $count, "title" => $title, "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "node", "type" => "node", "op" => "edit", "id" => $lno), "admin") : drupal_url(array("id" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
         break;
       case "comment":
-        $find[$i++] = array("count" => $count, "title" => check_output($title), "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "comment", "op" => "edit", "id" =>$lno), "admin") : drupal_url(array("id" => $nid, "cid" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
+        $find[$i++] = array("count" => $count, "title" => $title, "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "comment", "op" => "edit", "id" =>$lno), "admin") : drupal_url(array("id" => $nid, "cid" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
         break;
       }
     }
diff --git a/modules/search/search.module b/modules/search/search.module
index aa7a97b685bf..619c51b8e431 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -182,10 +182,10 @@ function do_search($search_array) {
       }
       switch ($type) {
       case "node":
-        $find[$i++] = array("count" => $count, "title" => check_output($title), "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "node", "type" => "node", "op" => "edit", "id" => $lno), "admin") : drupal_url(array("id" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
+        $find[$i++] = array("count" => $count, "title" => $title, "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "node", "type" => "node", "op" => "edit", "id" => $lno), "admin") : drupal_url(array("id" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
         break;
       case "comment":
-        $find[$i++] = array("count" => $count, "title" => check_output($title), "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "comment", "op" => "edit", "id" =>$lno), "admin") : drupal_url(array("id" => $nid, "cid" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
+        $find[$i++] = array("count" => $count, "title" => $title, "link" => (strstr($PHP_SELF, "admin.php") ? drupal_url(array("mod" => "comment", "op" => "edit", "id" =>$lno), "admin") : drupal_url(array("id" => $nid, "cid" => $lno))), "user" => $name, "date" => $created, "keywords" => implode("|", $words));
         break;
       }
     }
diff --git a/modules/statistics.module b/modules/statistics.module
index ff3eb87a2acc..ec27e9eaf040 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -427,7 +427,7 @@ function statistics_recent_refer($nid = 0) {
 
   $header = array(t("URL"), t("date"));
   while ($referrer = db_fetch_array($result)) {
-    $rows[] = array("<a href=\"". check_output($referrer["url"]) ."\">". substr(check_output($referrer["url"]), 0, 100) ."</a>", format_date($referrer["timestamp"], "small"));
+    $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr($referrer["url"], 0, 100) ."</a>", format_date($referrer["timestamp"], "small"));
   }
 
   $output .= table($header, $rows);
@@ -479,7 +479,7 @@ function statistics_top_refer($nid = 0) {
 
   $header = array(t("URL"), t("count"));
   while ($referrer = db_fetch_array($result)) {
-    $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr(check_output($referrer["url"]), 0, 100) ."</a>", $referrer["count"]);
+    $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr($referrer["url"], 0, 100) ."</a>", $referrer["count"]);
   }
 
   $output .= table($header, $rows);
@@ -889,7 +889,7 @@ function statistics_summary($dbfield, $dbrows) {
     $links = link_node($content, 1);
 
     $output .= "<tr><td><b>". l($nid["title"], array("id" => $nid["nid"]), "node", "", array("title" => t("View this posting."))) ."</b></td><td align=\"right\"><small>". t("Submitted by %a on %b", array("%a" => format_name($content), "%b" => format_date($content->created, "large"))) ."</td></tr>";
-    $output .= "</small><tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($content->teaser, 1) ."</div></td></tr>";
+    $output .= "</small><tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($content->teaser) ."</div></td></tr>";
     $output .= "<tr><td align=\"right\" colspan=\"2\">[ ". $theme->links($links) ." ]<br /><br /></td></tr>";
   }
 
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index ff3eb87a2acc..ec27e9eaf040 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -427,7 +427,7 @@ function statistics_recent_refer($nid = 0) {
 
   $header = array(t("URL"), t("date"));
   while ($referrer = db_fetch_array($result)) {
-    $rows[] = array("<a href=\"". check_output($referrer["url"]) ."\">". substr(check_output($referrer["url"]), 0, 100) ."</a>", format_date($referrer["timestamp"], "small"));
+    $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr($referrer["url"], 0, 100) ."</a>", format_date($referrer["timestamp"], "small"));
   }
 
   $output .= table($header, $rows);
@@ -479,7 +479,7 @@ function statistics_top_refer($nid = 0) {
 
   $header = array(t("URL"), t("count"));
   while ($referrer = db_fetch_array($result)) {
-    $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr(check_output($referrer["url"]), 0, 100) ."</a>", $referrer["count"]);
+    $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr($referrer["url"], 0, 100) ."</a>", $referrer["count"]);
   }
 
   $output .= table($header, $rows);
@@ -889,7 +889,7 @@ function statistics_summary($dbfield, $dbrows) {
     $links = link_node($content, 1);
 
     $output .= "<tr><td><b>". l($nid["title"], array("id" => $nid["nid"]), "node", "", array("title" => t("View this posting."))) ."</b></td><td align=\"right\"><small>". t("Submitted by %a on %b", array("%a" => format_name($content), "%b" => format_date($content->created, "large"))) ."</td></tr>";
-    $output .= "</small><tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($content->teaser, 1) ."</div></td></tr>";
+    $output .= "</small><tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($content->teaser) ."</div></td></tr>";
     $output .= "<tr><td align=\"right\" colspan=\"2\">[ ". $theme->links($links) ." ]<br /><br /></td></tr>";
   }
 
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 8a61d2b71d82..9c6f051ad271 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -276,7 +276,7 @@ function taxonomy_overview() {
     if ($tree) {
       unset($data);
       foreach ($tree as $term) {
-        $data .= _taxonomy_depth($term->depth) ." ". $term->name ." (". la(t("edit term"), array("mod" => "taxonomy", "op" => "edit", "type" => "term", "id" => check_output($term->tid))) .")<br />";
+        $data .= _taxonomy_depth($term->depth) ." ". $term->name ." (". la(t("edit term"), array("mod" => "taxonomy", "op" => "edit", "type" => "term", "id" => $term->tid)) .")<br />";
       }
       $rows[] = array(array("data" => $data, "colspan" => 5));
     }
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 8a61d2b71d82..9c6f051ad271 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -276,7 +276,7 @@ function taxonomy_overview() {
     if ($tree) {
       unset($data);
       foreach ($tree as $term) {
-        $data .= _taxonomy_depth($term->depth) ." ". $term->name ." (". la(t("edit term"), array("mod" => "taxonomy", "op" => "edit", "type" => "term", "id" => check_output($term->tid))) .")<br />";
+        $data .= _taxonomy_depth($term->depth) ." ". $term->name ." (". la(t("edit term"), array("mod" => "taxonomy", "op" => "edit", "type" => "term", "id" => $term->tid)) .")<br />";
       }
       $rows[] = array(array("data" => $data, "colspan" => 5));
     }
diff --git a/modules/tracker.module b/modules/tracker.module
index e663ea7984b6..5a2683dd9236 100644
--- a/modules/tracker.module
+++ b/modules/tracker.module
@@ -37,7 +37,7 @@ function tracker_comments($id = 0) {
   }
 
   while ($node = db_fetch_object($sresult)) {
-    $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." ". l(check_output($node->title), array("id" => $node->nid)) .":\n";
+    $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." ". l($node->title, array("id" => $node->nid)) .":\n";
 
     if ($id) {
       $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > $period AND c.uid = '%d' AND c.nid = '%d' ORDER BY cid DESC", $id, $node->nid);
@@ -48,7 +48,7 @@ function tracker_comments($id = 0) {
 
     $output .= "<ul>";
     while ($comment = db_fetch_object($cresult)) {
-      $output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? theme_invoke("theme_mark") : "") ."</li>\n";
+      $output .= " <li>". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? theme_invoke("theme_mark") : "") ."</li>\n";
     }
     $output .= " </ul>\n";
   }
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index e663ea7984b6..5a2683dd9236 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -37,7 +37,7 @@ function tracker_comments($id = 0) {
   }
 
   while ($node = db_fetch_object($sresult)) {
-    $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." ". l(check_output($node->title), array("id" => $node->nid)) .":\n";
+    $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." ". l($node->title, array("id" => $node->nid)) .":\n";
 
     if ($id) {
       $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > $period AND c.uid = '%d' AND c.nid = '%d' ORDER BY cid DESC", $id, $node->nid);
@@ -48,7 +48,7 @@ function tracker_comments($id = 0) {
 
     $output .= "<ul>";
     while ($comment = db_fetch_object($cresult)) {
-      $output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? theme_invoke("theme_mark") : "") ."</li>\n";
+      $output .= " <li>". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? theme_invoke("theme_mark") : "") ."</li>\n";
     }
     $output .= " </ul>\n";
   }
diff --git a/modules/user.module b/modules/user.module
index dbb25ef7360a..1f1493385d53 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -602,7 +602,7 @@ function user_login($edit = array(), $msg = "") {
   */
 
   if ($error) {
-    $output .= theme_invoke("theme_error", check_output($error));
+    $output .= theme_invoke("theme_error", $error);
   }
 
   /*
@@ -705,7 +705,7 @@ function user_pass($edit = array()) {
 
     // Display error message if necessary.
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
 
     /*
@@ -827,7 +827,7 @@ function user_register($edit = array()) {
   }
   else {
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
   }
 
@@ -944,7 +944,7 @@ function user_edit($edit = array()) {
     }
 
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
 
     if (!$edit) {
@@ -997,8 +997,8 @@ function user_view($uid = 0) {
   }
 
   if ($user->uid && $user->uid == $uid) {
-    $output = form_item(t("Name"), check_output("$user->name ($user->init)"));
-    $output .= form_item(t("E-mail address"), check_output($user->mail));
+    $output = form_item(t("Name"), "$user->name ($user->init)");
+    $output .= form_item(t("E-mail address"), $user->mail);
 
     foreach (module_list() as $module) {
       if (module_hook($module, "user")) {
@@ -1012,7 +1012,7 @@ function user_view($uid = 0) {
     $theme->footer();
   }
   else if ($uid && $account = user_load(array("uid" => $uid, "status" => 1))) {
-    $output = form_item(t("Name"), check_output($account->name));
+    $output = form_item(t("Name"), $account->name);
 
     foreach (module_list() as $module) {
       if (module_hook($module, "user")) {
@@ -1144,7 +1144,7 @@ function user_admin_create($edit = array()) {
   else {
 
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
 
     $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 55, t("Provide the username of the new account."));
@@ -1401,7 +1401,7 @@ function user_admin_edit($edit = array()) {
         $output .= status(t("your user information changes have been saved."));
       }
       else {
-        $output .= theme_invoke("theme_error", check_output($error));
+        $output .= theme_invoke("theme_error", $error);
       }
     }
     else if ($op == t("Delete account")) {
@@ -1419,7 +1419,7 @@ function user_admin_edit($edit = array()) {
     ** Display user form:
     */
 
-    $output .= form_item(t("User ID"), check_output($account->uid));
+    $output .= form_item(t("User ID"), $account->uid);
     $output .= form_textfield(t("Username"), "name", $account->name, 30, 55, t("Your full name or your preferred username: only letters, numbers and spaces are allowed."));
     $output .= form_textfield(t("E-mail address"), "mail", $account->mail, 30, 55, t("Insert a valid e-mail address.  All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail."));
 
diff --git a/modules/user/user.module b/modules/user/user.module
index dbb25ef7360a..1f1493385d53 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -602,7 +602,7 @@ function user_login($edit = array(), $msg = "") {
   */
 
   if ($error) {
-    $output .= theme_invoke("theme_error", check_output($error));
+    $output .= theme_invoke("theme_error", $error);
   }
 
   /*
@@ -705,7 +705,7 @@ function user_pass($edit = array()) {
 
     // Display error message if necessary.
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
 
     /*
@@ -827,7 +827,7 @@ function user_register($edit = array()) {
   }
   else {
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
   }
 
@@ -944,7 +944,7 @@ function user_edit($edit = array()) {
     }
 
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
 
     if (!$edit) {
@@ -997,8 +997,8 @@ function user_view($uid = 0) {
   }
 
   if ($user->uid && $user->uid == $uid) {
-    $output = form_item(t("Name"), check_output("$user->name ($user->init)"));
-    $output .= form_item(t("E-mail address"), check_output($user->mail));
+    $output = form_item(t("Name"), "$user->name ($user->init)");
+    $output .= form_item(t("E-mail address"), $user->mail);
 
     foreach (module_list() as $module) {
       if (module_hook($module, "user")) {
@@ -1012,7 +1012,7 @@ function user_view($uid = 0) {
     $theme->footer();
   }
   else if ($uid && $account = user_load(array("uid" => $uid, "status" => 1))) {
-    $output = form_item(t("Name"), check_output($account->name));
+    $output = form_item(t("Name"), $account->name);
 
     foreach (module_list() as $module) {
       if (module_hook($module, "user")) {
@@ -1144,7 +1144,7 @@ function user_admin_create($edit = array()) {
   else {
 
     if ($error) {
-      $output .= theme_invoke("theme_error", check_output($error));
+      $output .= theme_invoke("theme_error", $error);
     }
 
     $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 55, t("Provide the username of the new account."));
@@ -1401,7 +1401,7 @@ function user_admin_edit($edit = array()) {
         $output .= status(t("your user information changes have been saved."));
       }
       else {
-        $output .= theme_invoke("theme_error", check_output($error));
+        $output .= theme_invoke("theme_error", $error);
       }
     }
     else if ($op == t("Delete account")) {
@@ -1419,7 +1419,7 @@ function user_admin_edit($edit = array()) {
     ** Display user form:
     */
 
-    $output .= form_item(t("User ID"), check_output($account->uid));
+    $output .= form_item(t("User ID"), $account->uid);
     $output .= form_textfield(t("Username"), "name", $account->name, 30, 55, t("Your full name or your preferred username: only letters, numbers and spaces are allowed."));
     $output .= form_textfield(t("E-mail address"), "mail", $account->mail, 30, 55, t("Insert a valid e-mail address.  All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail."));
 
diff --git a/modules/watchdog.module b/modules/watchdog.module
index 5fef791586df..396351953ef4 100644
--- a/modules/watchdog.module
+++ b/modules/watchdog.module
@@ -71,12 +71,12 @@ function watchdog_view($id) {
 
   if ($watchdog = db_fetch_object($result)) {
     $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
-    $output .= " <tr><th>" . t("Type") . ":" . "</th><td>". check_output($watchdog->type) ."</td></tr>";
-    $output .= " <tr><th>" . t("Date") . ":" . "</th><td>". format_date($watchdog->timestamp, "large") ."</td></tr>";
-    $output .= " <tr><th>" . t("User") . ":" . "</th><td>". format_name($watchdog) ."</td></tr>";
-    $output .= " <tr><th>" . t("Location") . ":" . "</th><td>". check_output($watchdog->location) ."</td></tr>";
-    $output .= " <tr><th>" . t("Message") . ":" . "</th><td>". check_output($watchdog->message) ."</td></tr>";
-    $output .= " <tr><th>" . t("Hostname") . ":" . "</th><td>". check_output($watchdog->hostname) ."</td></tr>";
+    $output .= " <tr><th>". t("Type") ."</th><td>$watchdog->type</td></tr>";
+    $output .= " <tr><th>". t("Date") ."</th><td>". format_date($watchdog->timestamp, "large") ."</td></tr>";
+    $output .= " <tr><th>". t("User") ."</th><td>". format_name($watchdog) ."</td></tr>";
+    $output .= " <tr><th>". t("Location") ."</th><td>$watchdog->location</td></tr>";
+    $output .= " <tr><th>". t("Message") ."</th><td>$watchdog->message</td></tr>";
+    $output .= " <tr><th>". t("Hostname") ."</th><td>$watchdog->hostname</td></tr>";
     $output .= "</table>";
 
     return $output;
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index 5fef791586df..396351953ef4 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -71,12 +71,12 @@ function watchdog_view($id) {
 
   if ($watchdog = db_fetch_object($result)) {
     $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
-    $output .= " <tr><th>" . t("Type") . ":" . "</th><td>". check_output($watchdog->type) ."</td></tr>";
-    $output .= " <tr><th>" . t("Date") . ":" . "</th><td>". format_date($watchdog->timestamp, "large") ."</td></tr>";
-    $output .= " <tr><th>" . t("User") . ":" . "</th><td>". format_name($watchdog) ."</td></tr>";
-    $output .= " <tr><th>" . t("Location") . ":" . "</th><td>". check_output($watchdog->location) ."</td></tr>";
-    $output .= " <tr><th>" . t("Message") . ":" . "</th><td>". check_output($watchdog->message) ."</td></tr>";
-    $output .= " <tr><th>" . t("Hostname") . ":" . "</th><td>". check_output($watchdog->hostname) ."</td></tr>";
+    $output .= " <tr><th>". t("Type") ."</th><td>$watchdog->type</td></tr>";
+    $output .= " <tr><th>". t("Date") ."</th><td>". format_date($watchdog->timestamp, "large") ."</td></tr>";
+    $output .= " <tr><th>". t("User") ."</th><td>". format_name($watchdog) ."</td></tr>";
+    $output .= " <tr><th>". t("Location") ."</th><td>$watchdog->location</td></tr>";
+    $output .= " <tr><th>". t("Message") ."</th><td>$watchdog->message</td></tr>";
+    $output .= " <tr><th>". t("Hostname") ."</th><td>$watchdog->hostname</td></tr>";
     $output .= "</table>";
 
     return $output;
diff --git a/node.php b/node.php
index 0be74c8a3a31..c64fd6ebf41f 100644
--- a/node.php
+++ b/node.php
@@ -10,7 +10,7 @@ function node_render($node) {
 
   if (user_access("access content")) {
 
-    $theme->header(check_output($node->title));
+    $theme->header($node->title);
 
     node_view($node);
 
@@ -42,7 +42,7 @@ function node_failure() {
 
   while ($node = db_fetch_object($result)) {
     if (node_access("view", $node)) {
-      $output .= "<p><b>". l(check_output($node->title), array("id" => $node->nid)) ."</b><br /><small>$node->type - ". format_name($node) ." - ". format_date($node->ccreated, "small") ."</small></p>";
+      $output .= "<p><b>". l($node->title, array("id" => $node->nid)) ."</b><br /><small>$node->type - ". format_name($node) ." - ". format_date($node->ccreated, "small") ."</small></p>";
     }
   }
 
diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme
index 3816e16b609f..91da5e2e177f 100644
--- a/themes/goofy/goofy.theme
+++ b/themes/goofy/goofy.theme
@@ -115,7 +115,7 @@ function linksbar() { // helper function to prevent double code
 
     function node($node, $main = 0) {
       echo "\n<!-- node: \"$node->title\" -->\n";
-      $title = check_output($node->title);
+      $title = $node->title;
       $subleft = strtr(t("Submitted by %a on %b"), array("%a" => format_name($node), "%b" => format_date($node->created, "large")));
       if (function_exists("taxonomy_node_get_terms")) {
         if ($terms = taxonomy_node_get_terms($node->nid)) {
@@ -128,10 +128,10 @@ function node($node, $main = 0) {
       }
 
       if ($main && $node->teaser) {
-        $body = check_output($node->teaser, 1);
+        $body = check_output($node->teaser);
       }
       else {
-        $body = check_output($node->body, 1);
+        $body = check_output($node->body);
       }
 
       if ($links = link_node($node, $main)) {
@@ -144,9 +144,9 @@ function node($node, $main = 0) {
 
     function comment($comment, $link = "") {
       $author = "<b>" . format_name($comment) . "</b>";
-      $body = check_output($comment->comment, 1) . "<br><hr color=\"#404040\" size=\"1\"><div align=\"right\">[ $link ]</div>";
+      $body = check_output($comment->comment) . "<br><hr color=\"#404040\" size=\"1\"><div align=\"right\">[ $link ]</div>";
 
-      print "<script language=\"JavaScript\"><!--\nc(\"". $this->stripbreaks(addslashes(check_output($comment->subject))) ."\",\"". $this->stripbreaks(addslashes(comment_moderation($comment))) ."\",\"". $this->stripbreaks(addslashes($author)) ."\",\"". $this->stripbreaks(addslashes(format_date($comment->timestamp))) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n";
+      print "<script language=\"JavaScript\"><!--\nc(\"". $this->stripbreaks(addslashes($comment->subject)) ."\",\"". $this->stripbreaks(addslashes(comment_moderation($comment))) ."\",\"". $this->stripbreaks(addslashes($author)) ."\",\"". $this->stripbreaks(addslashes(format_date($comment->timestamp))) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n";
     } // close comment function
 
 
diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme
index 21710f487d13..27c425b386ce 100644
--- a/themes/marvin/marvin.theme
+++ b/themes/marvin/marvin.theme
@@ -94,16 +94,16 @@ function node($node, $main = 0) {
 
      print "\n<!-- node: \"$node->title\" -->\n";
      print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
-     print " <tr><td colspan=\"2\"><img src=\"$this->path/images/drop.gif\" alt=\"\" /> &nbsp; <b>". check_output($node->title) ."</b></td></tr>\n";
+     print " <tr><td colspan=\"2\"><img src=\"$this->path/images/drop.gif\" alt=\"\" /> &nbsp; <b>$node->title</b></td></tr>\n";
      print " <tr valign=\"bottom\"><td colspan=\"2\" bgcolor=\"#000000\" width=\"100%\"><img src=\"$this->path/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>\n";
      print " <tr><td nowrap=\"nowrap\"><font color=\"#7C7C7C\"><small>". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))); ?><?php print "</small></font></td><td align=\"right\" valign=\"top\" nowrap=\"nowrap\"><small>". $this->links($terms) ."</small></td></tr>\n";
      print " <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
 
      if ($main && $node->teaser) {
-       print " <tr><td colspan=\"2\"><p>". check_output($node->teaser, 1) ."</p></td></tr>\n";
+       print " <tr><td colspan=\"2\"><p>". check_output($node->teaser) ."</p></td></tr>\n";
      }
      else {
-       print " <tr><td colspan=\"2\"><p>". check_output($node->body, 1) ."</p></td></tr>\n";
+       print " <tr><td colspan=\"2\"><p>". check_output($node->body) ."</p></td></tr>\n";
      }
 
      print " <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
@@ -129,7 +129,7 @@ function comment($comment, $link = "") {
 
      // Subject:
      print "        <td align=\"right\" width=\"5%\"><b>". t("Subject") .":</b></td>\n";
-     print "        <td width=\"80%\"><b><font color=\"#666699\">". check_output($comment->subject) ."</font></b></td>\n";
+     print "        <td width=\"80%\"><b><font color=\"#666699\">$comment->subject</font></b></td>\n";
 
      // Moderation:
      print "        <td align=\"right\" rowspan=\"3\" valign=\"middle\" width=\"15%\">\n";
@@ -153,7 +153,7 @@ function comment($comment, $link = "") {
 
      // Print body of comment:
      if ($comment->comment) {
-       print "    <tr><td bgcolor=\"#FFFFFF\">". check_output($comment->comment, 1) ."</td></tr>\n";
+       print "    <tr><td bgcolor=\"#FFFFFF\">". check_output($comment->comment) ."</td></tr>\n";
      }
 
      // Print bottom link(s):
diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme
index 9e9d3b47a993..536907f077b4 100644
--- a/themes/unconed/unconed.theme
+++ b/themes/unconed/unconed.theme
@@ -98,7 +98,7 @@ function node($node, $main = 0) {
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
         <TR><TD>
          <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
-          <TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "". check_output($node->title) .""; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="<?php print $this->path; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR>
+          <TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "$node->title"; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="<?php print $this->path; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR>
           <TR BGCOLOR="<?php echo $this->bgcolor2; ?>">
            <?php
             if (function_exists("taxonomy_node_get_terms")) {
@@ -118,10 +118,10 @@ function node($node, $main = 0) {
           <TD BGCOLOR="<?php echo $this->bgcolor2 ?>" COLSPAN="2">
           <?php
            if ($main && $node->teaser) {
-             echo "<P>". check_output($node->teaser, 1) ."</P>";
+             echo "<P>". check_output($node->teaser) ."</P>";
            }
            else {
-             echo "<P>". check_output($node->body, 1) ."</P>";
+             echo "<P>". check_output($node->body) ."</P>";
            }
           ?>
           </TD>
@@ -152,7 +152,7 @@ function comment($comment, $link) {
      // Subject:
      echo "    <TR>";
      echo "     <TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"5%\"><FONT COLOR=\"$this->hlcolor1\"><B>" . t("Subject") . ":</B></FONT></TD><TD WIDTH=\"80%\">";
-     echo "      <B><FONT COLOR=\"$this->fgcolor1\">" . check_output($comment->subject) . "</FONT></B>";
+     echo "      <B><FONT COLOR=\"$this->fgcolor1\">$comment->subject</FONT></B>";
      echo "     </TD>";
 
      // Moderation:
@@ -175,7 +175,7 @@ function comment($comment, $link) {
      echo " </TR>";
 
      // Print body of comment:
-     if ($comment) echo " <TR><TD BGCOLOR=\"$this->bgcolor2\">". check_output($comment->comment, 1) ."</TD></TR>";
+     if ($comment) echo " <TR><TD BGCOLOR=\"$this->bgcolor2\">". check_output($comment->comment) ."</TD></TR>";
 
      // Print bottom link(s):
      echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"$this->bgcolor3\">[ $link ]</TD></TR>";
-- 
GitLab