function htmlspecialchars(string) = { return $ ('<span>').text(string).html() }
the text() function does what you want but only by inserting the string into an element. html() pulls it back out. Danny On Jan 10, 5:18 pm, acesfull9 <[EMAIL PROTECTED]> wrote: > is there a javascript/jQuery equivalent to htmlspecialchars($string) > in PHP