Feeds: removing text from a title I am using the feeds module to import an rss feed from twitter. The feed title and body starts with ": then my tweet". I wish to remover ":" from the creation of my nodes. I can remove it in the body by using a custom input format that removes it. However I can't remove it from the title.

I suppose I have two options:


While saving the nodes of my custom content type, remove the text
create a custom plugin for feeds


What do you think is the best way to do this? Should I try another way?

Update

I added hook_node_presave to deal with this. As it is called on both the insert and update.

/**
 * Implementation of hook hook_node_presave
 */
function my_module_node_presave($node) {
    if($node-&gt;type=='mytype'){
        $node-&gt;title =  _my_module_my_function($node-&gt;title);
        $node-&gt;body[$node-&gt;language][0]['value'] =  _my_module_my_function($node-&gt;body[$node-&gt;language][0]['value']);
    }
}


It works great but is this the correct place to be doing the check and removal?
I think this approach is fine for your use case, since it's so unlikely you'd intentionally begin a title or body with a colon on purpose.

I'd clean up the code a bit though for coding standards like

/**
 * Implements hook_node_presave().
 */
function my_module_node_presave($node) {
  if ($node-&gt;type == 'mytype') {
    $node-&gt;title = _my_module_my_function($node-&gt;title);
    $node-&gt;body[$node-&gt;language][0]['value'] =  _my_module_my_function($node-&gt;body[$node-&gt;language][0]['value']);
  }
}