I need to wrap each asterisks on a page with . The few things I\'ve tried don\'t work. I think what this boils down to is
This is a bit dirty and risky (explained below), but you could try the following:
var allHTML = $("body").html();
allHTML = allHTML.replace(/\*/g, "*");
$("body").html(allHTML);
http://jsfiddle.net/6rDK4/
Note: As Dogbert pointed out this might replace *
characters that are within HTML tags, e.g. node attributes.
EDIT: Bear in mind that this might reattach all the scripts you have in your body though! Try replacing body
with your main container.
EDIT2: VisioN posted a more elaborate but a lot safer solution.