Use template_preprocess_page() in the template.php to update the page title for full view, However please don't your code for hook_preprocess_node() as that code would be required for updating the page title for teaser view.
Examples:
// Example of updating the nodes title for all content types.
function MYTHEME_preprocess_page(&$vars) {
// Check if the variable is of node type.
if (!empty($vars['node']) {
$updated_title = cleaner(check_plain($node->title));
drupal_set_title($updated_title);
}
}
To update the page title of specific page just update the if
condition as below:
if (!empty($variables['node']) && $variables['node']->type == 'CONTENT_TYPE') {
$updated_title = cleaner(check_plain($node->title));
drupal_set_title($updated_title);
}
The above things will update the page title at the time of rendering, however the better solution is to clear the URL's from the node title before saving (insert/update) the node so that you wont need to modified at the time of rendering:
// Using the hook_node_presave() for removing the URL's from title.
function MyModule_node_presave($node) {
$node->title = cleaner(check_plain($node->title));
}
Note: The hook_node_presave() will help you for new nodes and the nodes those you are going to update.