From c989fc7cf7c3379ae85f187f085cc14a782f670c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 8 Jul 2004 13:35:15 +0000 Subject: - Small improvement to the filter.module's help text. - Revert patch that accidentically got committed. Thanks jhriggs. --- modules/filter.module | 26 ++++++++++++-------------- modules/filter/filter.module | 26 ++++++++++++-------------- 2 files changed, 24 insertions(+), 28 deletions(-) (limited to 'modules') diff --git a/modules/filter.module b/modules/filter.module index 91d6b21ce..4688d0bc0 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -17,7 +17,7 @@ function filter_help($section) { return t('Framework for handling filtering of content.'); case 'admin/filters': return t(" -

Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions.

+

Filters fit between the raw text in posts and comments, and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions.

If you notice some filters are causing conflicts in the output, you can rearrange them.

", array('%url' => url('admin/filters/order'))); case 'admin/filters/order': return t(" @@ -52,7 +52,7 @@ function filter_menu() { $items[] = array('path' => 'admin/filters', 'title' => t('filters'), 'callback' => 'filter_admin_settings', 'access' => user_access('administer site configuration')); - $items[] = array('path' => 'admin/filters/order', 'title' => t('order filters'), + $items[] = array('path' => 'admin/filters/order', 'title' => t('rearrange filters'), 'callback' => 'filter_admin_order', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK); @@ -197,20 +197,18 @@ function check_output($text) { * Perform the default filters, preventing malicious HTML from being displayed. */ function filter_default($text) { - if (!user_access('bypass html filter')) { - if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_STRIP) { - // Allow users to enter HTML, but filter it - $text = strip_tags($text, variable_get('allowed_html', '')); - if (variable_get('filter_style', FILTER_STYLE_STRIP)) { - $text = preg_replace('/\Wstyle\s*=[^>]+?>/i', '>', $text); - } - $text = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $text); + if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_STRIP) { + // Allow users to enter HTML, but filter it + $text = strip_tags($text, variable_get('allowed_html', '')); + if (variable_get('filter_style', FILTER_STYLE_STRIP)) { + $text = preg_replace('/\Wstyle\s*=[^>]+?>/i', '>', $text); } + $text = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $text); + } - if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_ESCAPE) { - // Escape HTML - $text = htmlspecialchars($text); - } + if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_ESCAPE) { + // Escape HTML + $text = htmlspecialchars($text); } return trim($text); diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 91d6b21ce..4688d0bc0 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -17,7 +17,7 @@ function filter_help($section) { return t('Framework for handling filtering of content.'); case 'admin/filters': return t(" -

Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions.

+

Filters fit between the raw text in posts and comments, and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions.

If you notice some filters are causing conflicts in the output, you can rearrange them.

", array('%url' => url('admin/filters/order'))); case 'admin/filters/order': return t(" @@ -52,7 +52,7 @@ function filter_menu() { $items[] = array('path' => 'admin/filters', 'title' => t('filters'), 'callback' => 'filter_admin_settings', 'access' => user_access('administer site configuration')); - $items[] = array('path' => 'admin/filters/order', 'title' => t('order filters'), + $items[] = array('path' => 'admin/filters/order', 'title' => t('rearrange filters'), 'callback' => 'filter_admin_order', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK); @@ -197,20 +197,18 @@ function check_output($text) { * Perform the default filters, preventing malicious HTML from being displayed. */ function filter_default($text) { - if (!user_access('bypass html filter')) { - if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_STRIP) { - // Allow users to enter HTML, but filter it - $text = strip_tags($text, variable_get('allowed_html', '')); - if (variable_get('filter_style', FILTER_STYLE_STRIP)) { - $text = preg_replace('/\Wstyle\s*=[^>]+?>/i', '>', $text); - } - $text = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $text); + if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_STRIP) { + // Allow users to enter HTML, but filter it + $text = strip_tags($text, variable_get('allowed_html', '')); + if (variable_get('filter_style', FILTER_STYLE_STRIP)) { + $text = preg_replace('/\Wstyle\s*=[^>]+?>/i', '>', $text); } + $text = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $text); + } - if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_ESCAPE) { - // Escape HTML - $text = htmlspecialchars($text); - } + if (variable_get('filter_html', FILTER_HTML_DONOTHING) == FILTER_HTML_ESCAPE) { + // Escape HTML + $text = htmlspecialchars($text); } return trim($text); -- cgit v1.2.3