Plugin Directory

Changeset 2839770


Ignore:
Timestamp:
12/27/2022 11:10:55 AM (3 years ago)
Author:
baden03
Message:

escaped all attributes before output

Location:
jquery-collapse-o-matic/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • jquery-collapse-o-matic/trunk/README.md

    r2629515 r2839770  
    11#Collapse-O-Matic
    22* Contributors: twinpictures, baden03
    3 * Donate link: https://plugins.twinpictures.de/plugins/collapse-o-matic/
     3* Donate link: https://pluginoven.com/panares-fund/
    44* Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
    55* Requires at least: 4.9
    6 * Tested up to: 5.8.2
    7 * Stable tag: 1.8.2
     6* Tested up to: 6.1.1
     7* Stable tag: 1.8.3
    88* Requires PHP: 7.2
    99* License: GPLv2 or later
  • jquery-collapse-o-matic/trunk/collapse-o-matic.php

    r2629515 r2839770  
    55Plugin URI: https://pluginoven.com/plugins/collapse-o-matic/
    66Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
    7 Version: 1.8.2
     7Version: 1.8.3
    88Author: twinpictures, baden03
    99Author URI: https://twinpictures.de/
     
    3030     * @var string
    3131     */
    32     var $version = '1.8.2';
     32    var $version = '1.8.3';
    3333
    3434    /**
     
    119119            $load_in_footer = true;
    120120        }
    121         wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.7.0', $load_in_footer);
     121        wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.7.2', $load_in_footer);
    122122       
    123123        //prep options for injection
     
    307307            $ewclass = '';
    308308            if($elwrapclass){
    309                 $ewclass = 'class="'.$elwrapclass.'"';
     309                $ewclass = 'class="'.esc_attr($elwrapclass).'"';
    310310            }
    311311            $ewo = '<'.$elwraptag.' '.$ewclass.'>';
     
    322322                $collapse_class = 'collapseomatic_content_inline ';
    323323            }
    324             $eDiv = '<'.$targtag.' id="target-'.$id.'" class="'.$collapse_class.$inline_class.$targclass.'">'.$content.'</'.$targtag.'>';
     324            $eDiv = '<'.$targtag.' id="target-'.$id.'" class="'.esc_attr($collapse_class.$inline_class.$targclass).'">'.$content.'</'.$targtag.'>';
    325325        }
    326326        if($excerpt){
     
    334334            }
    335335            if($excerptpos == 'above-trigger'){
    336                 $nibble = '<'.$excerpttag.' id="excerpt-'.$id.'" class="'.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
     336                $nibble = '<'.$excerpttag.' id="excerpt-'.esc_attr($id).'" class="'.esc_attr($excerptclass).'">'.$excerpt.'</'.$excerpttag.'>';
    337337            }
    338338            else{
    339                 $nibble = '<'.$excerpttag.' id="excerpt-'.$id.'" class="collapseomatic_excerpt '.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
     339                $nibble = '<'.$excerpttag.' id="excerpt-'.esc_attr($id).'" class="collapseomatic_excerpt '.esc_attr($excerptclass).'">'.$excerpt.'</'.$excerpttag.'>';
    340340            }
    341341            //swapexcerpt
     
    344344                $swapexcerpt = do_shortcode($swapexcerpt);
    345345                $swapexcerpt = apply_filters( 'colomat_swapexcerpt', $swapexcerpt );
    346                 $nibble .= '<'.$excerpttag.' id="swapexcerpt-'.$id.'" style="display:none;">'.$swapexcerpt.'</'.$excerpttag.'>';
     346                $nibble .= '<'.$excerpttag.' id="swapexcerpt-'.esc_attr($id).'" style="display:none;">'.$swapexcerpt.'</'.$excerpttag.'>';
    347347            }
    348348        }
    349349        $altatt = '';
    350350        if(!empty($alt)){
    351             $altatt = 'alt="'.$alt.'" title="'.$alt.'"';
     351            $altatt = 'alt="'.esc_attr($alt).'" title="'.esc_attr($alt).'"';
    352352        }
    353353        else if( empty($notitle) ){
    354             $altatt = 'title="'.$title.'"';
     354            $altatt = 'title="'.esc_attr($title).'"';
    355355        }
    356356        $relatt = '';
    357357        if(!empty($rel)){
    358             $relatt = 'rel="'.$rel.'"';
     358            $relatt = 'rel="'.esc_attr($rel).'"';
    359359        }
    360360
     
    366366
    367367        if($togglegroup){
    368             $groupatt = 'data-togglegroup="'.$togglegroup.'"';
     368            $groupatt = 'data-togglegroup="'.esc_attr($togglegroup).'"';
    369369        }
    370370        $inexatt = '';
    371371        //var_dump($tabindex);
    372372        if(!empty($tabindex) || $tabindex == 0 ){
    373             $inexatt = 'tabindex="'.$tabindex.'"';
     373            $inexatt = 'tabindex="'.esc_attr($tabindex).'"';
    374374        }
    375375        if($expanded && $expanded != 'false'){
     
    390390        $effatt = '';
    391391        if($animation_effect){
    392             $effatt = 'data-animation_effect="'.$animation_effect.'"';
     392            $effatt = 'data-animation_effect="'.esc_attr($animation_effect).'"';
    393393        }
    394394
     
    396396        $duratt = '';
    397397        if($duration){
    398             $duratt = 'data-duration="'.$duration.'"';
     398            $duratt = 'data-duration="'.esc_attr($duration).'"';
    399399        }
    400400
     
    402402        if($scrollonclose && (is_numeric($scrollonclose) || $scrollonclose == 0)){
    403403            $trigclass .= ' scroll-to-trigger';
    404             $closeanchor = '<input type="hidden" id="scrollonclose-'.$id.'" name="'.$scrollonclose.'"/>';
     404            $closeanchor = '<input type="hidden" id="scrollonclose-'.esc_attr($id).'" name="'.esc_attr($scrollonclose).'"/>';
    405405        }
    406406
    407407        //deal with image from collapse-commander
    408408        if( !empty($trigtype) && $trigtype == 'image' && !empty($triggerimage) && strtolower($tag) == 'img' ){
    409             $imageclass = 'collapseomatic noarrow' . $trigclass;
     409            $imageclass = 'collapseomatic noarrow' . esc_attr($trigclass);
    410410            $image_atts = array( 'id' => $id, 'class' => $imageclass, 'alt' => $alt );
    411411            if(!$notitle){
     
    418418                $title =  wp_get_attachment_image( $triggerimage, 'full' );
    419419            }
    420             $link = $closeanchor.'<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$inexatt.' '.$altatt.' '.$anchor.' '.$groupatt.' '.$effatt.' '.$duratt.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
     420            $link = $closeanchor.'<'.$tag.' class="collapseomatic '.esc_attr($trigclass).'" id="'.esc_attr($id).'" '.$relatt.' '.$inexatt.' '.$altatt.' '.$anchor.' '.$groupatt.' '.$effatt.' '.$duratt.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
    421421        }
    422422
     
    436436                $swapalt_attr = "alt='".$swapalt."'";
    437437            }
    438             $link .= "<".$tag." id='swap-".$id."' ".$swapalt_attr." class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
     438            $link .= "<".$tag." id='swap-".esc_attr($id)."' ".$swapalt_attr." class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
    439439        }
    440440
     
    642642                                            $se_array = array(
    643643                                                __('Slide Only', 'jquery-collapse-o-matic') => 'slideToggle',
    644                                                 __('Slide & Fade', 'jquery-collapse-o-matic') => 'slideFade'
     644                                                __('Slide & Fade', 'jquery-collapse-o-matic') => 'slideFade',
     645                                                __('Fade Only', 'jquery-collapse-o-matic') => 'fadeOnly'
    645646                                            );
    646647                                            foreach( $se_array as $key => $value){
  • jquery-collapse-o-matic/trunk/readme.txt

    r2629515 r2839770  
    22
    33Contributors: twinpictures, baden03
    4 Donate link: https://plugins.twinpictures.de/plugins/collapse-o-matic/
     4Donate link: https://pluginoven.com/panares-fund/
    55Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
    66Requires at least: 4.9
    7 Tested up to: 5.8.2
    8 Stable tag: 1.8.2
     7Tested up to: 6.1.1
     8Stable tag: 1.8.3
    99Requires PHP: 7.2
    1010License: GPLv2 or later
     
    5151
    5252== Changelog ==
     53
     54= 1.8.3 =
     55* added fadeOnly effect option
     56* fully tested with WordPress version 6.0.1
     57* swap title also swaps the title attribute if used
     58* escaped all attributes before output
    5359
    5460= 1.8.2 =
     
    404410
    405411== Upgrade Notice ==
    406 * custom css now added to new core.css file that is not affected if no default style is loaded.
    407 * fully tested with WordPress version 5.8.2
     412* added fadeOnly effect option
     413* fully tested with WordPress version 6.0.1
     414* swap title also swaps the title attribute if used
     415* escaped all attributes before output
Note: See TracChangeset for help on using the changeset viewer.