diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-27 00:40:42 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-27 00:40:42 +0000 |
commit | 59e5caac2fe490615e154c3f7cc65cb2c046c925 (patch) | |
tree | c51f9f43d0502ae62611e8951c9d93260cabe679 /modules | |
parent | 0f95dd45a94d00723f3ecd6483f3a6366cc7dbe9 (diff) | |
download | brdo-59e5caac2fe490615e154c3f7cc65cb2c046c925.tar.gz brdo-59e5caac2fe490615e154c3f7cc65cb2c046c925.tar.bz2 |
Roll-back of #401956, which needs more discussion.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/filter/filter.module | 28 | ||||
-rw-r--r-- | modules/filter/filter.test | 9 |
2 files changed, 3 insertions, 34 deletions
diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 5198f7d74..0fe072bd5 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -281,8 +281,7 @@ function filter_filter_tips($delta, $format, $long = FALSE) { case 4: return t('No HTML tags allowed'); break; - case 5: - return t('Use [internal:foo/bar] to get a link to the internal page <em>foo/bar</em>.'); + } } @@ -606,14 +605,7 @@ function theme_filter_guidelines($format) { function filter_filter($op, $delta = 0, $format = -1, $text = '') { switch ($op) { case 'list': - return array( - 0 => t('Limit allowed HTML tags'), - 1 => t('Convert line breaks'), - 2 => t('Convert URLs into links'), - 3 => t('Correct broken HTML'), - 4 => t('Escape all HTML'), - 5 => t('Create internal URLs'), - ); + return array(0 => t('Limit allowed HTML tags'), 1 => t('Convert line breaks'), 2 => t('Convert URLs into links'), 3 => t('Correct broken HTML'), 4 => t('Escape all HTML')); case 'description': switch ($delta) { @@ -627,8 +619,6 @@ function filter_filter($op, $delta = 0, $format = -1, $text = '') { return t('Corrects faulty and chopped off HTML in postings.'); case 4: return t('Escapes all HTML tags, so they will be visible instead of being effective.'); - case 5: - return t('Formats [internal:node/1234] as a URL.'); default: return; } @@ -645,8 +635,6 @@ function filter_filter($op, $delta = 0, $format = -1, $text = '') { return _filter_htmlcorrector($text); case 4: return trim(check_plain($text)); - case 5: - return _filter_internal($text); default: return $text; } @@ -866,18 +854,6 @@ function _filter_url_trim($text, $length = NULL) { } /** - * Turn [internal:foo] into url(foo). - * - * @param $text - * The text to apply the filter on. - * @return - * The filtered text. - */ -function _filter_internal($text) { - return preg_replace('/\[internal:([^\]]+)\]/e', "url('\\1')", $text); -} - -/** * Convert line breaks into <p> and <br> in an intelligent fashion. * Based on: http://photomatt.net/scripts/autop */ diff --git a/modules/filter/filter.test b/modules/filter/filter.test index 10c8f24f2..344737732 100644 --- a/modules/filter/filter.test +++ b/modules/filter/filter.test @@ -184,7 +184,7 @@ class FilterTestCase extends DrupalWebTestCase { function getInfo() { return array( 'name' => t('Core filters'), - 'description' => t('Filter each filter individually: Convert URLs into links, Convert line breaks, Correct broken HTML, Escape all HTML, Limit allowed HTML tags, check the internal filter.'), + 'description' => t('Filter each filter individually: Convert URLs into links, Convert line breaks, Correct broken HTML, Escape all HTML, Limit allowed HTML tags.'), 'group' => t('Filter'), ); } @@ -233,11 +233,4 @@ class FilterTestCase extends DrupalWebTestCase { $this->drupalPost('admin/settings/filter/delete/' . $format->format, array(), t('Delete')); } } - - /** - * Unit test for the internal link filter. - */ - function testInternalFilter() { - $this->assertEqual(_filter_internal('[internal:foo/bar] [internal:foo2/bar2]'), url('foo/bar') . ' ' . url('foo2/bar2'), t('The internal filter works')); - } } |