Board Thread:Support Requests - Getting Technical/@comment-26994567-20151011113240

Hello, I'm trying to set up a navigation box to put on the wiki rail on the right. Since this requires JavaScript, to avoid having to bother the Wikia team (and wait) each time I want to make a change to it, I'd like to be able to import the HTML code for the navbox from a wiki page.

Point is, the HTML I need contains many unsupported tags (like a simple ) so it can't just be plainly put there in source or it ends up broken with  's and   's.

The way I'm importing the code is with an XMLHttpRequest, from which I parse an HTML document on which I can call either a getElementById, getElementByName or getElementByTagName.

Naturally, if I just wrap the navbox code in  all special characters get converted to their & escapes so it renders as the source code when I import it. Wrapping in  or doesn't seem to work either, at least not in a straightforward way.

Would you have any suggestions, either as changes to the JS or better ways to tag the code? Surely one solution would be to host the navbox HTML on an external page, but I'd prefer to avoid that.

Thanks :)

(for reference: JS code, navbox page) 