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;
    }