? 455724-filter-markup.patch
? 455724-filter_plain.patch
? sites/default/files
? sites/default/private
Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.363
diff -u -p -r1.363 block.module
--- modules/block/block.module	23 Aug 2009 09:45:07 -0000	1.363
+++ modules/block/block.module	23 Aug 2009 15:07:39 -0000
@@ -220,7 +220,7 @@ function block_block_save($delta = 0, $e
  */
 function block_block_view($delta = 0, $edit = array()) {
   $block = db_query('SELECT body, format FROM {box} WHERE bid = :bid', array(':bid' => $delta))->fetchObject();
-  $data['content'] = check_markup($block->body, $block->format);
+  $data['content'] = filter_markup($block->body, $block->format);
   return $data;
 }
 
Index: modules/book/book.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.test,v
retrieving revision 1.15
diff -u -p -r1.15 book.test
--- modules/book/book.test	22 Aug 2009 14:34:18 -0000	1.15
+++ modules/book/book.test	23 Aug 2009 15:07:42 -0000
@@ -141,7 +141,7 @@ class BookTestCase extends DrupalWebTest
     // Check printer friendly version.
     $this->drupalGet('book/export/html/' . $node->nid);
     $this->assertText($node->title, t('Printer friendly title found.'));
-    $this->assertRaw(check_markup($node->body[FIELD_LANGUAGE_NONE][0]['value'], $node->body[FIELD_LANGUAGE_NONE][0]['format']), t('Printer friendly body found.'));
+    $this->assertRaw(filter_markup($node->body[FIELD_LANGUAGE_NONE][0]['value'], $node->body[FIELD_LANGUAGE_NONE][0]['format']), t('Printer friendly body found.'));
 
     $number++;
   }
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.756
diff -u -p -r1.756 comment.module
--- modules/comment/comment.module	22 Aug 2009 14:34:18 -0000	1.756
+++ modules/comment/comment.module	23 Aug 2009 15:07:45 -0000
@@ -816,7 +816,7 @@ function comment_build_content($comment,
 
   // Build comment body.
   $comment->content['comment_body'] = array(
-    '#markup' => check_markup($comment->comment, $comment->format),
+    '#markup' => filter_markup($comment->comment, $comment->format),
   );
 
   $comment->content += field_attach_view('comment', $comment, $build_mode);
@@ -1128,7 +1128,7 @@ function comment_node_update_index($node
       ':status' => COMMENT_PUBLISHED
     ));
     foreach ($comments as $comment) {
-      $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format);
+      $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . filter_markup($comment->comment, $comment->format);
     }
   }
   return $text;
@@ -2020,7 +2020,7 @@ 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'], $comment['comment_format'])))), 29, TRUE);
+    $comment['subject'] = truncate_utf8(trim(decode_entities(strip_tags(filter_markup($comment['comment'], $comment['comment_format'])))), 29, TRUE);
     // Edge cases where the comment body is populated only by HTML tags will
     // require a default subject.
     if ($comment['subject'] == '') {
Index: modules/comment/comment.tokens.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.tokens.inc,v
retrieving revision 1.1
diff -u -p -r1.1 comment.tokens.inc
--- modules/comment/comment.tokens.inc	19 Aug 2009 20:19:36 -0000	1.1
+++ modules/comment/comment.tokens.inc	23 Aug 2009 15:07:46 -0000
@@ -175,7 +175,7 @@ function comment_tokens($type, $tokens, 
           break;
 
         case 'body':
-          $replacements[$original] = $sanitize ? check_markup($comment->comment, $comment->format) : $replacements[$original] = $comment->comment;
+          $replacements[$original] = $sanitize ? filter_markup($comment->comment, $comment->format) : $replacements[$original] = $comment->comment;
           break;
 
         // Comment related URLs.
Index: modules/field/field.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.api.php,v
retrieving revision 1.29
diff -u -p -r1.29 field.api.php
--- modules/field/field.api.php	22 Aug 2009 00:58:52 -0000	1.29
+++ modules/field/field.api.php	23 Aug 2009 15:07:48 -0000
@@ -369,9 +369,9 @@ function hook_field_load($obj_type, $obj
         // handled by hook_field_sanitize().
         $format = $item['format'];
         if (filter_format_allowcache($format)) {
-          $items[$id][$delta]['safe'] = isset($item['value']) ? check_markup($item['value'], $format, $langcode, FALSE) : '';
+          $items[$id][$delta]['safe'] = isset($item['value']) ? filter_markup($item['value'], $format, $langcode, FALSE) : '';
           if ($field['type'] == 'text_with_summary') {
-            $items[$id][$delta]['safe_summary'] = isset($item['summary']) ? check_markup($item['summary'], $format, $langcode, FALSE) : '';
+            $items[$id][$delta]['safe_summary'] = isset($item['summary']) ? filter_markup($item['summary'], $format, $langcode, FALSE) : '';
           }
         }
       }
@@ -413,9 +413,9 @@ function hook_field_sanitize($obj_type, 
     if (!isset($items[$delta]['safe'])) {
       if (!empty($instance['settings']['text_processing'])) {
         $format = $item['format'];
-        $items[$delta]['safe'] = isset($item['value']) ? check_markup($item['value'], $format, $langcode) : '';
+        $items[$delta]['safe'] = isset($item['value']) ? filter_markup($item['value'], $format, $langcode) : '';
         if ($field['type'] == 'text_with_summary') {
-          $items[$delta]['safe_summary'] = isset($item['summary']) ? check_markup($item['summary'], $format, $langcode) : '';
+          $items[$delta]['safe_summary'] = isset($item['summary']) ? filter_markup($item['summary'], $format, $langcode) : '';
         }
       }
       else {
Index: modules/field/field.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.module,v
retrieving revision 1.25
diff -u -p -r1.25 field.module
--- modules/field/field.module	22 Aug 2009 00:58:52 -0000	1.25
+++ modules/field/field.module	23 Aug 2009 15:07:50 -0000
@@ -503,7 +503,7 @@ function _field_filter_xss_display_allow
  *
  * @return
  *   A string containing the contents of the field item(s) sanitized for display.
- *   It will have been passed through the necessary check_plain() or check_markup()
+ *   It will have been passed through the necessary check_plain() or filter_markup()
  *   functions as necessary.
  */
 function field_format($obj_type, $object, $field, $item, $formatter_type = NULL, $formatter_settings = array()) {
Index: modules/field/modules/text/text.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
retrieving revision 1.22
diff -u -p -r1.22 text.module
--- modules/field/modules/text/text.module	22 Aug 2009 14:34:20 -0000	1.22
+++ modules/field/modules/text/text.module	23 Aug 2009 15:07:51 -0000
@@ -219,9 +219,9 @@ function text_field_load($obj_type, $obj
         // handled by text_field_sanitize().
         $format = $item['format'];
         if (filter_format_allowcache($format)) {
-          $items[$id][$delta]['safe'] = isset($item['value']) ? check_markup($item['value'], $format, $langcode, FALSE) : '';
+          $items[$id][$delta]['safe'] = isset($item['value']) ? filter_markup($item['value'], $format, $langcode, FALSE) : '';
           if ($field['type'] == 'text_with_summary') {
-            $items[$id][$delta]['safe_summary'] = isset($item['summary']) ? check_markup($item['summary'], $format, $langcode, FALSE) : '';
+            $items[$id][$delta]['safe_summary'] = isset($item['summary']) ? filter_markup($item['summary'], $format, $langcode, FALSE) : '';
           }
         }
       }
@@ -248,9 +248,9 @@ function text_field_sanitize($obj_type, 
     if (!isset($items[$delta]['safe'])) {
       if (!empty($instance['settings']['text_processing'])) {
         $format = $item['format'];
-        $items[$delta]['safe'] = isset($item['value']) ? check_markup($item['value'], $format, $langcode) : '';
+        $items[$delta]['safe'] = isset($item['value']) ? filter_markup($item['value'], $format, $langcode) : '';
         if ($field['type'] == 'text_with_summary') {
-          $items[$delta]['safe_summary'] = isset($item['summary']) ? check_markup($item['summary'], $format, $langcode) : '';
+          $items[$delta]['safe_summary'] = isset($item['summary']) ? filter_markup($item['summary'], $format, $langcode) : '';
         }
       }
       else {
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.274
diff -u -p -r1.274 filter.module
--- modules/filter/filter.module	23 Aug 2009 01:05:10 -0000	1.274
+++ modules/filter/filter.module	23 Aug 2009 15:07:55 -0000
@@ -426,7 +426,7 @@ function filter_list_format($format) {
  *   The caller may set this to FALSE when the output is already cached
  *   elsewhere to avoid duplicate cache lookups and storage.
  */
-function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $langcode = '', $cache = TRUE) {
+function filter_markup($text, $format = FILTER_FORMAT_DEFAULT, $langcode = '', $cache = TRUE) {
   if (isset($text)) {
     $format = filter_resolve_format($format);
 
Index: modules/filter/filter.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.test,v
retrieving revision 1.32
diff -u -p -r1.32 filter.test
--- modules/filter/filter.test	22 Aug 2009 00:58:53 -0000	1.32
+++ modules/filter/filter.test	23 Aug 2009 15:07:56 -0000
@@ -411,7 +411,7 @@ class FilterUnitTest extends DrupalWebTe
   /**
    * Test filter settings, defaults, access restrictions and similar.
    *
-   * @todo This is for functions like filter_filter and check_markup, whose
+   * @todo This is for functions like filter_filter and filter_markup, whose
    *   functionality is not completely focused on filtering. Some ideas:
    *   restricting formats according to user permissions, proper cache
    *   handling, defaults -- allowed tags/attributes/protocols.
Index: modules/node/node.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.api.php,v
retrieving revision 1.36
diff -u -p -r1.36 node.api.php
--- modules/node/node.api.php	20 Aug 2009 10:56:33 -0000	1.36
+++ modules/node/node.api.php	23 Aug 2009 15:08:03 -0000
@@ -486,7 +486,7 @@ function hook_node_update_index($node) {
   $text = '';
   $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
   foreach ($comments as $comment) {
-    $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format);
+    $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . filter_markup($comment->comment, $comment->format);
   }
   return $text;
 }
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.268
diff -u -p -r1.268 profile.module
--- modules/profile/profile.module	22 Aug 2009 14:34:21 -0000	1.268
+++ modules/profile/profile.module	23 Aug 2009 15:08:11 -0000
@@ -285,7 +285,7 @@ function profile_view_field($account, $f
   if (isset($account->{$field->name}) && $value = $account->{$field->name}) {
     switch ($field->type) {
       case 'textarea':
-        return check_markup($value);
+        return filter_markup($value);
       case 'textfield':
       case 'selection':
         return $browse ? l($value, 'profile/' . $field->name . '/' . $value) : check_plain($value);
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1027
diff -u -p -r1.1027 user.module
--- modules/user/user.module	23 Aug 2009 01:05:12 -0000	1.1027
+++ modules/user/user.module	23 Aug 2009 15:08:37 -0000
@@ -2588,7 +2588,7 @@ function user_forms() {
  */
 function user_comment_view($comment) {
   if (variable_get('user_signatures', 0) && !empty($comment->signature)) {
-    $comment->signature = check_markup($comment->signature, $comment->format);
+    $comment->signature = filter_markup($comment->signature, $comment->format);
   }
   else {
     $comment->signature = '';
