Skip to content
Snippets Groups Projects
Commit 4499241f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Make sure the HTML filter is applied before any other filter.  Patch by
  Al.
parent 7f2ce4ac
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -476,8 +476,19 @@ function check_input($text) { ...@@ -476,8 +476,19 @@ function check_input($text) {
function filter($text) { function filter($text) {
foreach (module_list() as $name) { $modules = module_list();
if (module_hook($name, "filter")) {
/*
** 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); $text = module_invoke($name, "filter", $text);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment