output escaping Mozilla xls Javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jonny B
    New Member
    • Nov 2007
    • 3

    output escaping Mozilla xls Javascript

    I've been working on an xsl transfomation on the clientside using JavaScript for a few days now and have been pulling my hair out because Mozzilla doesnt support output escaping but Internet Explorer does so i had it nicely working in IE but not Mozilla.

    I finally found a workaround and promissed myself i would share it in as many forums as i could as its been so troublesome.

    'bodyText' is the div id where the text is output to.

    Code:
    document.getElementById('bodyText').innerHTML = document.getElementById('bodyText').textContent;
    not the best explination i know so any questions about this i will be happy to answer as its been such a pain for me.
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by Jonny B
    I've been working on an xsl transfomation on the clientside using JavaScript for a few days now and have been pulling my hair out because Mozzilla doesnt support output escaping but Internet Explorer does so i had it nicely working in IE but not Mozilla.

    I finally found a workaround and promissed myself i would share it in as many forums as i could as its been so troublesome.

    'bodyText' is the div id where the text is output to.

    Code:
    document.getElementById('bodyText').innerHTML = document.getElementById('bodyText').textContent;
    not the best explination i know so any questions about this i will be happy to answer as its been such a pain for me.
    Very cool Jonny B!

    Best regards...

    Dököll

    Comment

    Working...