28         $var = $event->getValue();
 
   29         if ((!is_string($var) && !is_array($var)) || empty($var)) {
 
   45             'elements' => 
'*-applet-button-form-input-textarea-iframe-script-style-embed-object',
 
   46             'deny_attribute' => 
'class, on*, formaction',
 
   47             'hook_tag' => 
'_elgg_htmlawed_tag_post_processor',
 
   49             'schemes' => 
'*:http,https,ftp,news,mailto,rtsp,teamspeak,gopher,mms,callto',
 
   54             $config[
'anti_link_spam'] = [
'/./', 
''];
 
   60         if (!is_array($var)) {
 
   64         $callback = 
function (&$v, $k, $config_spec) {
 
   65             if (!is_string($v) || empty($v)) {
 
   69             list (
$config, $spec) = $config_spec;
 
   73         array_walk_recursive($var, $callback, [
$config, $spec]);
 
   92                 'anti_link_spam' => [
'`.`', 
''],
 
   97                 'css_expression' => 0,
 
   98                 'deny_attribute' => 
'on*,style',
 
   99                 'direct_list_nest' => 1,
 
  100                 'elements' => 
'*-applet-button-form-input-textarea-iframe-script-style-embed-object',
 
  102                 'schemes' => 
'classid:clsid; href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; style: nil; *:file, http, https', 
 
  108         if (isset(
$config[
'spec']) && !$spec) {
 
  112         if ($spec === 
null) {
 
  114                 'object=-classid-type, -codebase',
 
  115                 'embed=type(oneof=application/x-shockwave-flash)' 
  139             'color', 
'cursor', 
'text-align', 
'vertical-align', 
'font-size',
 
  140             'font-weight', 
'font-style', 
'border', 
'border-top', 
'background-color',
 
  141             'border-bottom', 
'border-left', 
'border-right',
 
  142             'margin', 
'margin-top', 
'margin-bottom', 
'margin-left',
 
  143             'margin-right', 
'padding', 
'float', 
'text-decoration',
 
  146         $allowed_styles = 
elgg_trigger_event_results(
'allowed_styles', 
'htmlawed', [
'tag' => $event->getParam(
'tag')], $allowed_styles);
 
  148         $styles = explode(
';', 
$style);
 
  151         foreach ($styles as 
$style) {
 
  156             list($style_attr, $style_value) = explode(
':', trim(
$style));
 
  157             $style_attr = trim($style_attr);
 
  158             $style_value = trim($style_value);
 
  160             if (in_array($style_attr, $allowed_styles)) {
 
  161                 $style_str .= 
"{$style_attr}: {$style_value}; ";
 
  165         if (empty($style_str)) {
 
$attributes
Elgg AJAX loader.
 
Models an event passed to event handlers.
 
elgg_in_context(string $context)
Check if this context exists anywhere in the stack.
 
$config
Advanced site settings, debugging section.
 
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
 
elgg_trigger_event_results(string $event, string $type, array $params=[], $returnvalue=null)
Triggers an event where it is expected that the mixed return value could be manipulated by event call...
 
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.