I made some modifications to views_node.inc which allows me to return the Node: Title in Plain Text which is useful if you want to display a list of node titles in a select box.

I'm not sure what the right etiquette is for contributing to the project. Could someone please let me know if this is an example of where I should write a patch?

The solution was to change Line 18 in views_node.inc to:

          'views_handler_field_nodelink_with_mark' => t('With updated mark'),
	   'views_handler_field_plaintext' => t('Plain text')

Then I added this function on line 417:

/*
 * No link, just plain text
 *
 */
function views_handler_field_plaintext($fieldinfo, $fielddata, $value, $data) {
  return $value;
}

Comments

merlinofchaos’s picture

Status: Needs review » Closed (won't fix)

This doesn't seem necessary. If you select "Normal" for the handler and "Without link" you get a safe plain version of the title.

This as a patch would allow unsafe text to be output directly to the user. That's a security hole and cannot be allowed.

If check_plain makes your data unsuitable for using in a select box, you're going to have to look directly at the raw data in your theming function. For title, it would be $node->node_title.