Changing a.nodeValue to root[a.nodeName] creates another bug that is much severe than absolute links been converted to relative.
Changing a.nodeValue to root[a.nodeName] creates
another bug that is much severe than absolute
links been converted to relative.

So I'm changing it back...

dilawar/moodle