summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 80d842c03..57f57c24d 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -476,8 +476,19 @@ function check_input($text) {
function filter($text) {
- foreach (module_list() as $name) {
- if (module_hook($name, "filter")) {
+ $modules = module_list();
+
+ /*
+ ** Make sure the HTML filters that are part of the node module
+ ** are run first.
+ */
+
+ if (in_array("node", $modules)) {
+ $text = module_invoke("node", "filter", $text);
+ }
+
+ foreach ($modules as $name) {
+ if (module_hook($name, "filter") && $name != "node") {
$text = module_invoke($name, "filter", $text);
}
}