a more thorough fix for #2328
fix JavaScript loading error in IE10, fix URL encoding in internal paths
fix use of children not found in older browsers, needs to be childNodes