function superfish_sanitize in Superfish 7
Sanitization function.
Parameters
string $string: The input.
string $type: Sanitization type.
Return value
string Sanitized string.
1 call to superfish_sanitize()
- superfish_block_view in ./
superfish.module - Implements hook_block_view().
File
- ./
superfish.module, line 1974 - Enables the use of jQuery Superfish plugin for Drupal menus.
Code
function superfish_sanitize($string, $type = '') {
if ($type == 'strict') {
$allowed_tags = array();
}
else {
$allowed_tags = array(
'a',
'abbr',
'acronym',
'address',
'area',
'article',
'aside',
'audio',
'b',
'base',
'bdi',
'bdo',
'big',
'blockquote',
'br',
'button',
'canvas',
'caption',
'cite',
'code',
'col',
'colgroup',
'command',
'datalist',
'dd',
'del',
'details',
'dfn',
'div',
'dl',
'dt',
'em',
'embed',
'fieldset',
'figcaption',
'figure',
'footer',
'form',
'frame',
'frameset',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'header',
'hgroup',
'hr',
'i',
'iframe',
'img',
'ins',
'kbd',
'keygen',
'label',
'legend',
'li',
'map',
'mark',
'meter',
'nav',
'noframes',
'noscript',
'object',
'ol',
'optgroup',
'option',
'output',
'p',
'param',
'pre',
'progress',
'q',
'rp',
'rt',
'ruby',
'samp',
'section',
'select',
'small',
'source',
'span',
'strong',
'sub',
'summary',
'sup',
'table',
'tbody',
'td',
'textarea',
'tfoot',
'th',
'thead',
'time',
'tr',
'track',
'tt',
'ul',
'var',
'video',
'wbr',
);
}
return filter_xss($string, $allowed_tags);
}