//Set the multi-line HTML data var htmlData = RemoveOuter(function(){/*!
Hello!
*/}); //Set the body to the html data $("body").html(htmlData); //Removes the functions (allowing multiple line strings) function RemoveOuter(f){ return f.toString().replace("*/}", '').replace("function (){/*!", '').replace(/^\s+|\s+$/g, ''); }