PluginProbe ʕ •ᴥ•ʔ
Responsive Lightbox & Gallery / trunk
Responsive Lightbox & Gallery vtrunk
2.7.8 trunk 1.0.0 1.0.1 1.0.1.1 1.0.2 1.0.3 1.0.4 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.0.1 1.4.1 1.4.11 1.4.12 1.4.13 1.4.14 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.3.1 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7
responsive-lightbox / js / sanitizer.js
responsive-lightbox / js Last commit date
admin-folders.js 1 month ago admin-galleries.js 5 months ago admin-gallery.js 5 months ago admin-media.js 1 month ago admin-plugins.js 6 months ago admin-settings.js 5 months ago admin-theme.js 5 months ago admin-widgets.js 5 months ago front-basicmasonry.js 6 months ago front-basicslider.js 5 months ago front.js 1 month ago gutenberg.js 5 months ago sanitizer.js 1 month ago
sanitizer.js
2 lines
1 (t=>{const e=t.RLG||(t.RLG={}),i=t=>t&&"function"==typeof t.sanitize,o=/["'<>`]/,r=/^data:image\/(?:png|jpeg|gif|webp|avif);base64,[a-z0-9+/=\r\n]+$/i,n=t=>(!i(t)||"function"!=typeof t.addHook||t.__rlHooksRegistered||(t.addHook("afterSanitizeAttributes",t=>{if("img"===(t&&t.nodeName&&t.nodeName.toLowerCase&&t.nodeName.toLowerCase())){const i=t.getAttribute&&t.getAttribute("src");i&&!e.isAllowedMediaUrl(i)&&t.removeAttribute("src")}}),t.addHook("uponSanitizeElement",function(t){if("iframe"===(t&&t.nodeName&&t.nodeName.toLowerCase&&t.nodeName.toLowerCase())){const i=t.getAttribute&&t.getAttribute("src");i&&e.isAllowedEmbedUrl(i)||t.parentNode&&t.parentNode.removeChild(t)}}),t.__rlHooksRegistered=!0),t),a=t=>{const e=Array.prototype.some.call(t,t=>{const e=t.charCodeAt(0);return e<=31||127===e});return"string"==typeof t&&""!==t&&t.trim()===t&&!e&&!o.test(t)};e.getPurifier=()=>i(e.DOMPurify)?n(e.DOMPurify):i(t.DOMPurify)?n(t.DOMPurify):null,e.sanitizeConfig=e.sanitizeConfig||{ALLOWED_TAGS:["a","abbr","b","br","code","em","i","li","ol","p","pre","small","strong","sub","sup","u","ul","img","div","span"],ALLOWED_ATTR:["href","src","alt","title","width","height","class","id","rel","target","data-*"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel):|[^a-z]|data:image\/(?:png|jpeg|gif|webp|avif);base64,)/i},e.isAllowedMediaUrl=t=>{if(!a(t))return!1;if(r.test(t))return!0;if(e.sanitizeConfig&&e.sanitizeConfig.ALLOWED_URI_REGEXP&&!e.sanitizeConfig.ALLOWED_URI_REGEXP.test(t))return!1;try{const e=new URL(t,location.href);return"http:"===e.protocol||"https:"===e.protocol}catch(i){return!1}},e.isAllowedEmbedUrl=t=>{if(!a(t))return!1;try{const i=new URL(t,location.href);if("http:"!==i.protocol&&"https:"!==i.protocol)return!1;if(i.hostname===location.hostname)return!0;if(Array.isArray(e.sanitizeAllowedHosts)){const t=i.hostname.toLowerCase();return e.sanitizeAllowedHosts.some(e=>(e=(e||"").toLowerCase(),t===e||t.endsWith("."+e)))}return!1}catch(i){return!1}},e.sanitizeHtml=(t,i=null)=>{const o=e.getPurifier();return o?o.sanitize(t,i||e.sanitizeConfig||{}):t}})(window);
2