src/Fluent/Runner.php
protected function runEscape($func, $value)
    {
        if (! is_string($value)) {
            throw new RunnerException('Cannot escape value of type '.gettype($value));
        }

        $whitelist = [
            'esc_attr',
            'esc_html',
            'esc_js',
            'esc_textarea',
            'esc_url',
            'htmlspecialchars',
            'urlencode',
        ];

        return (in_array($func, $whitelist))
            ? call_user_func($func, $value)
            : $value;
    }
protected function runEscape($func, $value)
    {
        if (! is_string($value)) {
            throw new RunnerException('Cannot escape value of type '.gettype($value));
        }

        $whitelist = [
            'esc_attr',
            'esc_html',
            'esc_js',
            'esc_textarea',
            'esc_url',
            'htmlspecialchars',
            'urlencode',
        ];

        return (in_array($func, $whitelist))
            ? call_user_func($func, $value)
            : $value;
    }
protected function runEscape ( $ func , $ value ) { if ( ! is_string ( $ value ) ) { throw new RunnerException ( 'Cannot escape value of type ' . gettype ( $ value ) ) ; } $ whitelist = [ 'esc_attr' , 'esc_html' , 'esc_js' , 'esc_textarea' , 'esc_url' , 'htmlspecialchars' , 'urlencode' , ] ; return ( in_array ( $ func , $ whitelist ) ) ? call_user_func ( $ func , $ value ) : $ value ; }
Escape the value with the given function.

@param  callable  $func
@param  string  $value
@return string
Escape the value with the given function .