diff --git a/themes/default/scripts/elk_toolTips.js b/themes/default/scripts/elk_toolTips.js index 0a93044d61..3da1f4eca4 100644 --- a/themes/default/scripts/elk_toolTips.js +++ b/themes/default/scripts/elk_toolTips.js @@ -52,8 +52,8 @@ class SiteTooltip { let title = el.getAttribute('title'); - el.setAttribute('data-title', title); el.removeAttribute('title'); + el.setAttribute('data-title', title); el.addEventListener('mouseenter', this.showTooltip.bind(this)); el.addEventListener('mouseleave', this.hideTooltip.bind(this)); } @@ -123,6 +123,16 @@ class SiteTooltip // Load the tooltip content with our data-title if (this.settings.tooltipContent === 'html') { + // Regular expression to match content inside .bbc_code_inline span + let regex = new RegExp('().*?(<\/span>)', 's'); + + title = title.replace(regex, function(match, p1, p2) + { + let content = match.slice(p1.length, -p2.length); + let replacedContent = content.replace(/