Changeset 105733 in spip-zone


Ignore:
Timestamp:
Aug 12, 2017, 6:51:41 PM (2 years ago)
Author:
arnaud.berard@…
Message:

correction sur lazy_size insertion $flux peut être facultatif
inc_safe_html peut prendre un tableau de balises html et restrictions en parametre $allowed
+z

Location:
_plugins_/lazysizes/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/lazysizes/trunk/inc/safehtml.php

    r105530 r105733  
    1414if (!defined("_ECRIRE_INC_VERSION")) return;
    1515
    16 function inc_safehtml($t) {
     16function inc_safehtml($t, $allowed = null) {
    1717        static $purifier;
    1818
     
    2424        include_spip('lib/HTMLPurifier.standalone');
    2525       
     26       
    2627
    2728        $config = HTMLPurifier_Config::createDefault();
    2829        $config->set('HTML.Doctype', 'HTML 4.01 Transitional');
    2930        $config->set('CSS.AllowTricky', true);
     31        $config->set('HTML.Allowed', $allowed);
    3032        $config->set('Cache.SerializerPath', preg_replace(',/$,', '', realpath(_DIR_TMP)));
    3133        $def = $config->getHTMLDefinition(true);
    32        
     34         
    3335        // HTML5
    3436        // https://github.com/lukusw/php-htmlpurfier-html5/blob/master/htmlpurifier_html5.php
     
    4648    $def->addElement('figure', 'Block', 'Optional: (figcaption, Flow) | (Flow, figcaption) | Flow', 'Common');
    4749    $def->addElement('figcaption', 'Inline', 'Flow', 'Common');
    48        
     50        /*
     51         * element_name,
     52         * element_type,
     53         * element_childs_attributes,
     54         * attributes
     55         **/
    4956        // http://developers.whatwg.org/the-video-element.html#the-video-element
    5057    $def->addElement('video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array(
  • _plugins_/lazysizes/trunk/lazysizes_fonctions.php

    r105556 r105733  
    3838}
    3939
    40 function lazysizes_insertion_js(){
    41         $flux = '';
     40function lazysizes_insertion_js($flux = ''){
    4241        include_spip('inc/config');
    4342        $lazy_options = lire_config('lazysizes/options');
  • _plugins_/lazysizes/trunk/paquet.xml

    r105556 r105733  
    22        prefix="lazysizes"
    33        categorie="outil"
    4         version="4.0.0.12"
     4        version="4.0.0.13"
    55        etat="dev"
    66        compatibilite="[3.0.0;3.1.*]"
Note: See TracChangeset for help on using the changeset viewer.