summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-03-07 23:14:20 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-03-07 23:14:20 +0000
commit47371be0a5353aef7b34d5bdc70d31c6fd249dfc (patch)
tree9373f976babd62d6cfe6de905e3bc8ea8bb6b6b0 /modules/comment
parentc5bfbe7fa6bf237cf956a9367be2aa723bf9bdaf (diff)
downloadbrdo-47371be0a5353aef7b34d5bdc70d31c6fd249dfc.tar.gz
brdo-47371be0a5353aef7b34d5bdc70d31c6fd249dfc.tar.bz2
#414424 by sun, chx, Arancaytar, yched, et al: Introduce Form API #type 'text_format' for additional DX/security around rich text fields.
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.module1
-rw-r--r--modules/comment/comment.test2
2 files changed, 1 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 6071f37dc..56fe0982c 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2051,7 +2051,6 @@ function comment_submit($comment) {
// 1) Filter it into HTML
// 2) Strip out all HTML tags
// 3) Convert entities back to plain-text.
-
$comment['subject'] = truncate_utf8(trim(decode_entities(strip_tags(check_markup($comment['comment_body'][LANGUAGE_NONE][0]['value'], $comment['comment_body'][LANGUAGE_NONE][0]['format'])))), 29, TRUE);
// Edge cases where the comment body is populated only by HTML tags will
// require a default subject.
diff --git a/modules/comment/comment.test b/modules/comment/comment.test
index 5fc78cbe1..ec355a13c 100644
--- a/modules/comment/comment.test
+++ b/modules/comment/comment.test
@@ -571,7 +571,7 @@ class CommentAnonymous extends CommentHelperCase {
$this->drupalGet('comment/reply/' . $this->node->nid);
$this->assertText('You are not authorized to view comments', t('Error attempting to post comment.'));
$this->assertNoFieldByName('subject', '', t('Subject field not found.'));
- $this->assertNoFieldByName('comment', '', t('Comment field not found.'));
+ $this->assertNoFieldByName('comment[value]', '', t('Comment field not found.'));
user_role_change_permissions(DRUPAL_ANONYMOUS_RID, array(
'access comments' => TRUE,