diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-08-22 12:55:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-08-22 12:55:04 +0000 |
commit | b36d4959ef2244298fd28d02575c88b0259555b4 (patch) | |
tree | 6712fdd01deb61927df28a8a4d0107d92286bc56 /modules/simpletest | |
parent | b0894ceaa74c01444856910fd87dfc992542eb85 (diff) | |
download | brdo-b36d4959ef2244298fd28d02575c88b0259555b4.tar.gz brdo-b36d4959ef2244298fd28d02575c88b0259555b4.tar.bz2 |
- Patch #358437 by David_Rothstein, Berdir, sun: filter system security fixes from SA-2008-073 not applied to Drupal 7.x.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/filter_test.module | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/simpletest/tests/filter_test.module b/modules/simpletest/tests/filter_test.module index 691d2231f..01a69315b 100644 --- a/modules/simpletest/tests/filter_test.module +++ b/modules/simpletest/tests/filter_test.module @@ -36,6 +36,28 @@ function filter_test_filter_info() { 'description' => 'Does nothing, but makes a text format uncacheable.', 'cache' => FALSE, ); + $filters['filter_test_replace'] = array( + 'title' => 'Testing filter', + 'description' => 'Replaces all content with filter and text format information.', + 'process callback' => 'filter_test_replace', + ); return $filters; } +/** + * Process handler for filter_test_replace filter. + * + * Replaces all text with filter and text format information. + */ +function filter_test_replace($text, $filter, $format, $langcode, $cache, $cache_id) { + $text = array(); + $text[] = 'Filter: ' . $filter->title . ' (' . $filter->name . ')'; + $text[] = 'Format: ' . $format->name . ' (' . $format->format . ')'; + $text[] = 'Language: ' . $langcode; + $text[] = 'Cache: ' . ($cache ? 'Enabled' : 'Disabled'); + if ($cache_id) { + $text[] = 'Cache ID: ' . $cache_id; + } + return implode("<br />\n", $text); +} + |