Changeset 112147 in spip-zone


Ignore:
Timestamp:
Oct 24, 2018, 2:47:37 PM (7 months ago)
Author:
gouz@…
Message:

configuration du TidyLevel? a none et autorisation de l'attribut rel avec les valeurs facebox,nofollow,print,external

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/htmlpurifier/inc/safehtml.php

    r112142 r112147  
    2828        $config = HTMLPurifier_Config::createDefault();
    2929
     30        $config->set('HTML.TidyLevel', 'none');
    3031        $config->set('Cache.SerializerPath', preg_replace(',/$,', '', realpath(_DIR_TMP)));
    3132        $config->set('Attr.AllowedFrameTargets', array('_blank'));
    32  
    33   $config->set('URI.AllowedSchemes', array ('http' => true, 'https' => true, 'mailto' => true, 'ftp' => true, 'nntp' => true, 'news' => true, 'tel' => true, 'tcp'=>true, 'udp'=>true, 'ssh'=>true,));
    34   HTMLPurifier_URISchemeRegistry::instance()->register(new HTMLPurifier_URIScheme_tcp, $config);
    35   HTMLPurifier_URISchemeRegistry::instance()->register(new HTMLPurifier_URIScheme_udp, $config);
    36   HTMLPurifier_URISchemeRegistry::instance()->register(new HTMLPurifier_URIScheme_ssh, $config);
     33  $config->set('Attr', 'AllowedRel', 'facebox,nofollow,print,external');
     34 
     35        $config->set('URI.AllowedSchemes', array ('http' => true, 'https' => true, 'mailto' => true, 'ftp' => true, 'nntp' => true, 'news' => true, 'tel' => true, 'tcp'=>true, 'udp'=>true, 'ssh'=>true,));
     36        HTMLPurifier_URISchemeRegistry::instance()->register(new HTMLPurifier_URIScheme_tcp, $config);
     37        HTMLPurifier_URISchemeRegistry::instance()->register(new HTMLPurifier_URIScheme_udp, $config);
     38        HTMLPurifier_URISchemeRegistry::instance()->register(new HTMLPurifier_URIScheme_ssh, $config);
    3739       
    3840        $html = $config->getHTMLDefinition(true);
Note: See TracChangeset for help on using the changeset viewer.