PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.37
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.37
3.37 3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 All 142 releases
← All changes | include/js/front-end/src/Components/Tooltip.js +5 -3 3.33 → 3.37 View file →
@@ -16,9 +16,11 @@
16 16 });
17 17 }
18 18
19 19 function create(tooltip, elm) {
20 - const tooltipText = elm.getAttribute('data-photonic-tooltip');
20 + let tooltipText = elm.getAttribute('data-photonic-tooltip');
21 + tooltipText = strip_tags(tooltipText, '<br><strong><em><b><i><p>');
22 +
21 23 if (tooltipText !== '') {
22 24 elm.setAttribute('title', ''); // Blank out the regular title
23 25
24 26 // elemEdges relative to the viewport.
@@ -24,10 +26,10 @@
24 26 // elemEdges relative to the viewport.
25 27 elemEdges = elm.getBoundingClientRect();
26 28
27 29 const tooltipTextNode = document.createTextNode(tooltipText);
28 - tooltip.innerHTML = ''; // Reset, or upon refresh the node gets repeated
29 - tooltip.appendChild(tooltipTextNode);
30 + tooltip.innerHTML = tooltipText; // ''; // Reset, or upon refresh the node gets repeated
31 + // tooltip.appendChild(tooltipTextNode);
30 32
31 33 // Remove no-display + set the correct classname based on the position
32 34 // of the elm.
33 35 if (elemEdges.left > window.innerWidth - 100) {