summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-12-09 13:40:47 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-12-09 13:40:47 +0000
commita4f431aeb41b7d98fcf913aff53c27f42e0fa929 (patch)
treef6034278e96ed94b5b70e74ff2c889f18d206e51
parente8ca5acddef9931e8d473e4a2f70129d99a16104 (diff)
downloadbrdo-a4f431aeb41b7d98fcf913aff53c27f42e0fa929.tar.gz
brdo-a4f431aeb41b7d98fcf913aff53c27f42e0fa929.tar.bz2
- strip HTML tags from comment subjects.
-rw-r--r--modules/comment.module2
-rw-r--r--modules/comment/comment.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module
index f18054efd..0bf024501 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -115,7 +115,7 @@ function comment_post($edit) {
}
else {
// validate subject:
- $edit[subject] = $edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29);
+ $edit[subject] = strip_tags(($edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29)));
// add watchdog entry:
watchdog("special", "comment: added '$edit[subject]'");
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index f18054efd..0bf024501 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -115,7 +115,7 @@ function comment_post($edit) {
}
else {
// validate subject:
- $edit[subject] = $edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29);
+ $edit[subject] = strip_tags(($edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29)));
// add watchdog entry:
watchdog("special", "comment: added '$edit[subject]'");