Plugin Directory

Changeset 3343557


Ignore:
Timestamp:
08/12/2025 12:40:33 PM (8 months ago)
Author:
wpsofts
Message:

WordPress comptiblity and lightGallery issue resolved

Location:
portfolio-wp/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • portfolio-wp/trunk/js/jquery/jquery.lightgallery.js

    r2692770 r3343557  
    211211                        var orig = e.originalEvent;
    212212                        endCoords = orig.targetTouches[0];
    213                        
     213
    214214                        //patch
    215215                        if(!jQuery(e.target).parent().hasClass("lg-info")) e.preventDefault();
     
    294294                return '<div class="video-cont" style="max-width:' + settings.videoMaxWidth + ' !important;"><div class="video">' + video + '</div></div>';
    295295            },
     296            sanitizeHtml: function (dirtyHtml) {
     297              const dangerousTags = ['script', 'iframe', 'object', 'embed', 'style', 'link', 'meta'];
     298              const dangerousAttrs = ['on', 'xlink:href', 'srcdoc'];
     299
     300              const temp = document.createElement('div');
     301              temp.innerHTML = dirtyHtml;
     302
     303              const walk = (node) => {
     304                if (node.nodeType === Node.ELEMENT_NODE) {
     305                  const tag = node.tagName.toLowerCase();
     306
     307                  // Remove dangerous tags
     308                  if (dangerousTags.includes(tag)) {
     309                    node.remove();
     310                    return;
     311                  }
     312
     313                  // Remove dangerous attributes
     314                  for (const attr of Array.from(node.attributes)) {
     315                    const name = attr.name.toLowerCase();
     316                    const value = attr.value;
     317
     318                    // Remove any event handlers or javascript: links
     319                    if (
     320                      name.startsWith('on') ||
     321                      dangerousAttrs.includes(name) ||
     322                      value.toLowerCase().includes('javascript:') ||
     323                      value.toLowerCase().includes('data:')
     324                    ) {
     325                      node.removeAttribute(attr.name);
     326                    }
     327                  }
     328                }
     329
     330                // Recursively walk through child nodes
     331                for (const child of Array.from(node.childNodes)) {
     332                  walk(child);
     333                }
     334              };
     335
     336              walk(temp);
     337
     338              return temp.innerHTML;
     339            },
    296340            addHtml: function (index) {
    297341                var dataSubHtml = null;
     
    308352                        dataSubHtml = dataSubHtml;
    309353                    }
     354
     355                    var $this = this;
     356                    dataSubHtml = $this.sanitizeHtml(dataSubHtml);
    310357                    $slide.eq(index).append(dataSubHtml);
    311358                }
     
    319366                }
    320367                if (typeof dataSubHtml !== 'undefined' && dataSubHtml !== null) {
     368
     369                    var $this = this;
     370                    dataSubHtml = $this.sanitizeHtml(dataSubHtml);
    321371                    $gallery.append(dataSubHtml);
    322372                }
     
    453503                    $gallery.append('<div class="thumb-cont"><div class="thumb-info">' + $close + '</div><div class="thumb-inner"></div></div>');
    454504                    $thumb_cont = $gallery.find('.thumb-cont');
    455                     $prev.after('<a class="cl-external"><i class="fa fa-chain cl-icon"></a>'); //mx: 
    456                     $prev.after('<a class="cl-info"><i class="fa fa-info cl-icon"></i></a>'); //mx: 
     505                    $prev.after('<a class="cl-external"><i class="fa fa-chain cl-icon"></a>'); //mx:
     506                    $prev.after('<a class="cl-info"><i class="fa fa-info cl-icon"></i></a>'); //mx:
    457507                    $prev.after('<a class="cl-thumb"><i class="fa fa-list cl-icon"></a>');
    458508                    $prev.parent().addClass('has-thumb');
  • portfolio-wp/trunk/portfolio-wp.php

    r3133347 r3343557  
    88* Author URI: http://wpsofts.com
    99* License: GPLv2 or later
    10 * Version: 2.2.1
     10* Version: 2.2.2
    1111*/
    1212
  • portfolio-wp/trunk/readme.txt

    r3133355 r3343557  
    1 ===  Portfolio, Gallery, Product Catalog - Grid KIT Portfolio ===
     1===  Portfolio Gallery, Product Catalog - Grid KIT Portfolio ===
    22Contributors: wpsofts
    33Tags: portfolio, gallery, photo gallery, portfolio gallery, portfolio plugin
    44Requires at least: 4.0
    5 Tested up to: 6.6.1
    6 Stable tag: 2.2.1
     5Tested up to: 6.8.2
     6Stable tag: 2.2.2
    77License: GPLv2 or later
    88
    9 Portfolio, gallery, product catalog, teams, logos and more. All-in-one plugin - Grid Kit Portfolio Gallery
     9Portfolio, gallery, catalog, instagram feed etc. all in one plugin - Grid Kit Portfolio Gallery
    1010
    1111== Description ==
     
    1313= GRID KIT PORTFOLIO GALLERY BY WPSOFTS =
    1414
    15 Ultimate solution for building WordPress layouts, e.g. portfolio showcases, video or photo gallery, product catalog, image slider, instagram feed, clients or team members gallery.
     15Ultimate solution for building WordPress layouts, e.g. portfolio showcase, video or photo gallery, product catalog, image slider, instagram feed, clients or team members gallery.
    1616
    1717https://youtu.be/QsvR-h0YzE8
    1818
    19 Grid Kit Portfolio was designed to to build simple portfolio & gallery layouts, but powerful enough to be used for:
    20 
    21 * Showcasing work portfolio projects
     19GridKit Portfolio Gallery designed to to build simple portfolio galleries, but powerful enough to be used for:
     20
     21* Showcasing portfolio projects
    2222* Building multipurpose gallery layouts
    2323* Grouping galleries into albums
    24 * Listing product catalog entries
     24* Listing product catalog items
    2525* Building slider presentations
    26 * Showcasing sponsors or client logos
     26* Showcasing sponsors or clients logos
    2727* Making team members presentation
    2828
     
    3131
    3232= RESPONSIVE & MOBILE FRIENDLY =
    33 Don't worry about responsiveness anymore! Grid Kit Portfolio will make your gallery presentations compatible in any environment, be it a mobile, tablet or desktop.
     33Don't worry about responsiveness anymore! Grid Kit Portfolio Gallery will make your content compatible in any environment, be it a mobile, tablet or desktop.
    3434
    3535= LAYOUT BUILDERS =
    36 Embedded layout builder included as a Free feature! Build layout structures such as a portfolio, photo gallery, product catalog, photo gallery slider, clients or sponsors presentation, team members grid.
     36Embedded layout builder included as a Free feature! Build layout structures from your portfolio, photo gallery, product catalog, gallery sliders, clients logos and team members.
    3737
    3838= POPUP ADD-ON =
     
    100100== Detailed Description ==
    101101
    102 GridKit Portfolio is a powerful all-in-one WordPress multipurpose gallery plugin for building almost any kind of layouts. All gallery layouts are 100% mobile friendly. Choose one of supported layout schemes which the best meets your needs ( e.g. grids, masonry, puzzle or slider ) to showcase your portfolio in literally few minutes. It supports popup add-ons for portfolio content, gallery images, iFrame contents, videos or maps. Grid Kit Portfolio Gallery includes 1000+ predefined animations, effects and themes. Premium version also supports predefined templates gallery / library which helps you pick one of supported templates to get started your gallery with few clicks. The portfolio project related captions, descriptions, links, hover buttons are supported. Element categorization, video or photo gallery pagination and content lazy loading features improves your website's performance. Portfolio or gallery items can be shared with a single click, the social sharing feature is an embedded add-on which you can be turned on from your layout settings. So you'll let your visitors share your portfolio and gallery elements right from the gallery layout presentation. This is not the all, you can turn your website into an eCommerce platform and showcase products, catalogs on your website. Let customers place online product enquiries, leave product reviews on your catalogs. Customizations are limited in Free version, but with Premium version you'll be able to customize almost everything in the settings section. And the most important one, no coding knowledge required!
    103 
    104 And this are just top notch features implemented in the Grid Kit portfolio & gallery builder, there are dozen of supported features you’ll definitely enjoy!
     102GridKit Portfolio Gallery is a powerful all-in-one WordPress multipurpose plugin for building almost any kind of layouts. All gallery layouts are 100% mobile friendly. Choose one of supported layout schemes which the best meets your needs ( e.g. grids, masonry, puzzle or slider ) to showcase your portfolio in literally few minutes. It supports popup add-ons for portfolio content, gallery images, iFrame contents, videos or maps. Grid Kit Portfolio Gallery includes 1000+ predefined animations, effects and themes. Premium version also supports predefined templates library which helps you pick one of supported templates to get started with few clicks. Portfolio project captions, descriptions, links, hover buttons are supported. Project categorization, video or photo gallery pagination and content lazy loading improves your website's performance. Social sharing is an embedded add-on which you can turn on from your settings and let your visitors share your portfolio projects right from the gallery presentation. This is not the all, you can turn your website to eCommerce and showcase product catalogs on your website. Let customers place online product enquiries or leave product reviews. Customizations are limited in Free version, but with Premium version you'll be able to customize almost everything from settings section. And the most important one, no coding knowledge required!
     103
     104And this are just top notch features implemented in Grid Kit Portfolio Gallery, there are dozen of supported features you’ll definitely enjoy!
    105105
    106106
     
    125125= Can I put 2 portfolio layouts on the same page? =
    126126
    127 Multiple portfolio layouts on the page is supported in the Premium version! More detailed information you can checkout [here](https://wpsofts/com).
     127Multiple portfolio layouts on the page is supported in Premium version! More detailed information you can checkout [here](https://wpsofts/com).
    128128
    129129=  Cannot redeclare activation_hook() error message on installation! =
     
    185185== Changelog ==
    186186
     187= 2.2.2 =
     188* lightGallery related issues were fixed
     189* WP 6.8.2 compatibility checked
     190
    187191= 2.2.1 =
    188192* Admin loader z-index related issue resolved
Note: See TracChangeset for help on using the changeset viewer.