Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HandlerBase.php

function HandlerBase::sanitizeValue

Overrides ViewsHandlerInterface::sanitizeValue

16 calls to HandlerBase::sanitizeValue()
DblogMessage::render in core/modules/dblog/src/Plugin/views/field/DblogMessage.php
Renders the field.
DblogOperations::render in core/modules/dblog/src/Plugin/views/field/DblogOperations.php
Renders the field.
EntityLabel::render in core/modules/views/src/Plugin/views/field/EntityLabel.php
Renders the field.
FieldPluginBase::render in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Renders the field.
File::render in core/modules/file/src/Plugin/views/field/File.php
Renders the field.

... See full list

File

core/modules/views/src/Plugin/views/HandlerBase.php, line 204

Class

HandlerBase
Base class for Views handler plugins.

Namespace

Drupal\views\Plugin\views

Code

public function sanitizeValue($value, $type = NULL) {
    if ($value === NULL) {
        return '';
    }
    switch ($type) {
        case 'xss':
            $value = Xss::filter($value);
            break;
        case 'xss_admin':
            $value = Xss::filterAdmin($value);
            break;
        case 'url':
            $value = Html::escape(UrlHelper::stripDangerousProtocols($value));
            break;
        default:
            $value = Html::escape($value);
            break;
    }
    return ViewsRenderPipelineMarkup::create($value);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal