| @@ -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) { |