Since you're saving it with php why not just use the php functions that do the same?
http://us3.php.net/htmlentities cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Frederik Ring <frederik.r...@gmail.com> To: "jQuery (English)" <jquery-en@googlegroups.com> Date: 02/18/2009 08:14 AM Subject: [jQuery] Auto-Replacing HTML-entities Hello! I have setup a simple editor site for a image gallery where the user can visually edit (sort entries, add entries, edit captions) the HTML of a <ul>. When finished the content gets saved via PHP. Is there a simple way to have special characters in image captions converted into HTML entities? The way I read the then transmitted <ul> is: var html = $('#container').html(); $('#textfield').text('html'); The content of the #textfield is then written into a new HTML file. Is there a jQuery-way to do it or would I have to use a RegExp? Thanks!
<<inline: graycol.gif>>
<<inline: ecblank.gif>>