function views_handler_field::render_altered

Render this field as altered text, from a fieldset set by the user.

2 calls to views_handler_field::render_altered()
views_handler_field::render_text in handlers/views_handler_field.inc
Perform an advanced text render for the item.
views_handler_field::tokenize_value in handlers/views_handler_field.inc
Replace a value with tokens from the last field.

File

handlers/views_handler_field.inc, line 1267

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

public function render_altered($alter, $tokens) {
    // We trust admins so we allow any tag content. This is important for
    // displays such as XML where we should not mess with tags.
    $value = $alter['text'];
    $value = strtr($value, $tokens);
    // User might already used '%5B' and '%5D' instead of literal [ and ].
    // After token replacements, we need to convert those codes to literal
    // square bracket characters. Otherwise problems like comment #5 and #6 of
    // https://www.drupal.org/node/578772 will happen.
    // We could have used rawurldecode() also, but not sure about the consequences.
    $value = strtr($value, array(
        '%5B' => '[',
        '%5D' => ']',
    ));
    return $value;
}