diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-08-18 13:18:45 +0200 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-08-18 13:18:45 +0200 |
commit | dc2900bb1f42df828927f9fc4d8235ca058f0aa5 (patch) | |
tree | 53ef927e7f9b573f1f115b13e4d40121d07d7455 /modules/simpletest | |
parent | ec12b314fac08e638ff4ed152cb7412739941166 (diff) | |
download | brdo-dc2900bb1f42df828927f9fc4d8235ca058f0aa5.tar.gz brdo-dc2900bb1f42df828927f9fc4d8235ca058f0aa5.tar.bz2 |
Issue #1211668 by scito, Devin Carlson, bornholtz: Fixed Special characters are encoded twice for feed icon attribute title.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/common.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 437b67cd1..8848b5c26 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -2587,3 +2587,30 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase { return $generated_pattern; } } + +/** + * Test for theme_feed_icon(). + */ +class FeedIconTest extends DrupalWebTestCase { + + public static function getInfo() { + return array( + 'name' => 'Feed icon', + 'description' => 'Check escaping of theme_feed_icon()', + 'group' => 'System', + ); + } + + /** + * Check that special characters are correctly escaped. Test for issue #1211668. + */ + function testFeedIconEscaping() { + $variables = array(); + $variables['url'] = 'node'; + $variables['title'] = '<>&"\''; + $text = theme_feed_icon($variables); + preg_match('/title="(.*?)"/', $text, $matches); + $this->assertEqual($matches[1], 'Subscribe to &"'', 'theme_feed_icon() escapes reserved HTML characters.'); + } + +} |