Index: modules/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.351
diff -u -r1.351 node.module
--- modules/node.module	3 May 2004 17:38:40 -0000	1.351
+++ modules/node.module	30 May 2004 15:38:07 -0000
@@ -507,10 +507,10 @@
 function node_prepare($node, $main = 0) {
   $node->readmore = (strlen($node->teaser) < strlen($node->body));
   if ($main == 0) {
-    $node->body = check_output($node->body);
+    $node->body = check_output($node->body, array("context" => "node", "data" => &$node));
   }
   else {
-    $node->teaser = check_output($node->teaser);
+    $node->teaser = check_output($node->teaser, array("context" => "node", "data" => &$node));
   }
   return $node;
 }
Index: modules/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter.module,v
retrieving revision 1.15
diff -u -r1.15 filter.module
--- modules/filter.module	17 May 2004 22:00:06 -0000	1.15
+++ modules/filter.module	30 May 2004 15:38:08 -0000
@@ -147,15 +147,21 @@
 /**
  * Run all the enabled filters on a piece of text.
  */
-function check_output($text) {
+function check_output($text, $context = array()) {
   if (isset($text)) {
+    
+    // Convert all Windows and Mac newlines to a single newline,
+    // so filters only need to deal with this one
+    $text = str_replace(array("\r\n", "\r"), "\n", $text);
+    
+    // Get complete list of filters ordered properly
     $filters = filter_list();
 
     // Give filters the chance to escape HTML-like data such as code or formulas.
     // From this point on, the input can be treated as HTML.
     if (variable_get('filter_html', FILTER_HTML_DONOTHING) != FILTER_HTML_ESCAPE) {
       foreach ($filters as $module => $filter) {
-        $text = module_invoke($module, 'filter', 'prepare', $text);
+        $text = module_invoke($module, 'filter', 'prepare', $text, $context);
       }
     }
 
@@ -164,7 +170,7 @@
 
     // Regular filtering.
     foreach ($filters as $module => $filter) {
-      $text = module_invoke($module, 'filter', 'process', $text);
+      $text = module_invoke($module, 'filter', 'process', $text, $context);
     }
 
     // If only inline elements are used and no block level elements, we
Index: modules/title.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/title.module,v
retrieving revision 1.32
diff -u -r1.32 title.module
--- modules/title.module	24 May 2004 18:37:50 -0000	1.32
+++ modules/title.module	30 May 2004 15:38:08 -0000
@@ -8,6 +8,10 @@
   switch ($section) {
     case 'admin/system/modules#description':
       return t('Enables users to link to stories, articles or similar content by title.');
+    case 'filter#short-tip' :
+      return t('<a href=\"%title-help\">Link to content</a> on this site using <em>[title|text]</em>.', array("%title-help" => url('filter/tips', NULL, 'filter-title')));
+    case 'filter#long-tip' :
+      return '<p>' . t('You may quickly link to content on the site using this syntax: <em>[title|text]</em>. This will generate a link labeled "text" to the content with the title "title". If you omit "|text", the label becomes "title".') . '</p>';
   }
 }
 
@@ -63,7 +67,7 @@
 /**
  * Implementation of hook_filter().
  */
-function title_filter($op, $text = '') {
+function title_filter($op, $text = '', $context = array()) {
   switch ($op) {
     case 'name':
       return t('Title filter');
@@ -92,8 +96,4 @@
   return form_group(t('Title filter'), t('Wiki-like [node title|text] links are enabled. These shortcuts generate a link labeled "text" to the node with the title "node title". If you omit "|text", the label becomes "node title". You may use a substring of a node title if desired. When multiple matching titles are found, a list of matching nodes will be displayed. If no matching titles are found, a full-text search is returned.'));
 }
 
-function title_compose_tips() {
-  return array(t('You may quickly link to another node using this syntax: <em>[node title|text]</em>. This will generate a link labeled "text" to the node with the title "node title". If you omit "|text", the label becomes "node title".'));
-}
-
 ?>
