Good Day All

in my page i have a hyperlink button in a gridview defined like this


Code:
       <a href="#" onclick="<%#  String.Format("return showComment('{0}','{1}')", Replace(Eval("Field1").ToString(),Chr(13),"<BR>"), Replace(Eval("Field2").ToString(),Chr(13),"<BR>") ) %>">
 
                             <img src="../../Imgs/comment2.png" />
                             </a>
and the Function showComment is defined like this



Code:
        function showComment(CommentPend,CommentCancel) 
        {
            $("#btnclose").unbind();
            $("#divPendComment").center();
            $("#divPendComment").fadeIn('slow');

            $("#txtcomment").val(CommentPend.toString().replace(/^[a-z0-9 ]$/i, ''));

            $("#txtcommentCancel").val(CommentCancel.toString().replace(/^[a-z0-9 ]$/i, ''));
             
            $("#btnclose").click(function (e)
             {

                 $("#divPendComment").fadeOut('slow');
                 e.preventDefault();

            }); 
            return false;
        }
now as you can see i am trying to get rid of the special characters like the carriage returns but still i get a a javascript error when this link is clicked

Uncaught SyntaxError: Unexpected token ILLEGAL

thanks