summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-19 19:30:04 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-19 19:30:04 +0000
commit3ec108eccc5e77d18209e555f3f979bcf122aeaf (patch)
tree1fa09f2d3b66d6b1c9c70842657b3dd0b3a1cd1e
parent74aa71e89b8d1fbb65c84c1a746af74ed47f3cd8 (diff)
downloadbrdo-3ec108eccc5e77d18209e555f3f979bcf122aeaf.tar.gz
brdo-3ec108eccc5e77d18209e555f3f979bcf122aeaf.tar.bz2
- Refinements by Walkah, based on suggestions of Steven and myself.
-rw-r--r--modules/filter.module6
-rw-r--r--modules/filter/filter.module6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/filter.module b/modules/filter.module
index 3cb1a9196..eba59437f 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -904,7 +904,7 @@ function _filter_html_settings($format) {
$group .= form_textfield(t('Allowed HTML tags'), "allowed_html_$format", variable_get("allowed_html_$format", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 64, 255, t('If "Strip tags" is selected, optionally specify tags which should not be stripped. Javascript event attributes are always stripped.'));
$group .= form_checkbox(t('Display HTML help'), "filter_html_help_$format", 1, variable_get("filter_html_help_$format", 1), t('If enabled, Drupal will display some basic HTML help in the long filter tips.'));
$group .= form_radios(t('HTML style attributes'), "filter_style_$format", variable_get("filter_style_$format", FILTER_STYLE_STRIP), array(FILTER_STYLE_ALLOW => t('Allowed'), FILTER_STYLE_STRIP => t('Removed')), t('If "Strip tags" is selected, you can choose whether "STYLE" attributes are allowed or removed from input.'));
- $group .= form_checkbox(t('Add rel="nofollow" to links'), "filter_html_nofollow_$format", 1, variable_get("filter_html_nofollow_$format", FALSE), t('If enabled, Drupal will add rel="nofollow" to all links, as a measure to reduce the effectiveness of spam content.'));
+ $group .= form_checkbox(t('Spam link deterrent'), "filter_html_nofollow_$format", 1, variable_get("filter_html_nofollow_$format", FALSE), t('If enabled, Drupal will add rel="nofollow" to all links, as a measure to reduce the effectiveness of spam links. Note: this will also prevent valid links from being followed by search engines, therefore it is likely most effective when enabled for anonymous users.'));
$output .= form_group(t('HTML filter'), $group);
return $output;
@@ -928,8 +928,8 @@ function _filter_html($text, $format) {
$text = drupal_specialchars($text);
}
- if (variable_get("filter_html_nofollow_$format", 0)) {
- $text = preg_replace('/<a([^>]+)>/i', '<a\\1 rel="nofollow">',$text);
+ if (variable_get("filter_html_nofollow_$format", FALSE)) {
+ $text = preg_replace('/<a([^>]+)>/i', '<a\\1 rel="nofollow">', $text);
}
return trim($text);
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 3cb1a9196..eba59437f 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -904,7 +904,7 @@ function _filter_html_settings($format) {
$group .= form_textfield(t('Allowed HTML tags'), "allowed_html_$format", variable_get("allowed_html_$format", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 64, 255, t('If "Strip tags" is selected, optionally specify tags which should not be stripped. Javascript event attributes are always stripped.'));
$group .= form_checkbox(t('Display HTML help'), "filter_html_help_$format", 1, variable_get("filter_html_help_$format", 1), t('If enabled, Drupal will display some basic HTML help in the long filter tips.'));
$group .= form_radios(t('HTML style attributes'), "filter_style_$format", variable_get("filter_style_$format", FILTER_STYLE_STRIP), array(FILTER_STYLE_ALLOW => t('Allowed'), FILTER_STYLE_STRIP => t('Removed')), t('If "Strip tags" is selected, you can choose whether "STYLE" attributes are allowed or removed from input.'));
- $group .= form_checkbox(t('Add rel="nofollow" to links'), "filter_html_nofollow_$format", 1, variable_get("filter_html_nofollow_$format", FALSE), t('If enabled, Drupal will add rel="nofollow" to all links, as a measure to reduce the effectiveness of spam content.'));
+ $group .= form_checkbox(t('Spam link deterrent'), "filter_html_nofollow_$format", 1, variable_get("filter_html_nofollow_$format", FALSE), t('If enabled, Drupal will add rel="nofollow" to all links, as a measure to reduce the effectiveness of spam links. Note: this will also prevent valid links from being followed by search engines, therefore it is likely most effective when enabled for anonymous users.'));
$output .= form_group(t('HTML filter'), $group);
return $output;
@@ -928,8 +928,8 @@ function _filter_html($text, $format) {
$text = drupal_specialchars($text);
}
- if (variable_get("filter_html_nofollow_$format", 0)) {
- $text = preg_replace('/<a([^>]+)>/i', '<a\\1 rel="nofollow">',$text);
+ if (variable_get("filter_html_nofollow_$format", FALSE)) {
+ $text = preg_replace('/<a([^>]+)>/i', '<a\\1 rel="nofollow">', $text);
}
return trim($text);