I didn't write this but i think i narrowed this down to where i need to do this update. OK here is the problem there is a name field that if it has a ' in the name or any other special char the window.open doesn't work. I think i just need to replace all the special char and do something with the ' in the name so it can be recognized but I'm just learning J Query and some help would be greatly appreciated. Thank you

here is the line i think that maybe can be improved or maybe i need a new line. If this isnt right i can post the whole file but its pretty big.

return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];