workaround for entity bug (?) in tabber
A user of my tabber script discovered that when his tab headings had an ampersand character like this:
<h2>Me & My Shadow</h2>
Then the tab control displayed “&” instead of a single ampersand character.
It looks like this occurs because the JavaScript DOM function document.createTextNode() does not convert entities. However, it looks like innerHTML does convert entities, so to fix your problem find the following line in tabber.js:
DOM_a.appendChild(document.createTextNode(t.headingText));
and replace with the following:
DOM_a.innerHTML = t.headingText;
I’ll think about this some more and if I can’t find any bad side effects I’ll add to the tabber code.
February 6th, 2007 at 12:32 pm
yeah thanx a lot man
October 3rd, 2007 at 6:15 pm
This almost fixes the issue. However, when you hover over the tab with the & the Title still shows & Can you please look into this?
Thanks!
November 13th, 2007 at 9:47 am
Thanks! I was just looking into this when I came across your answer! Great script!
December 13th, 2007 at 5:07 pm
Thanks for the codes you posted here…
I found it very useful and successfully implemented in my own website.
THANKS! very nice work!
Cheers,
Lee