Re: escaping text?? is it non-latin support question?
Actually, I have spotted what was screwing everything up. If I have a double-quotation mark (") in the textarea, then the text will not get processed properly on the server when I do a getParameter("news") I save the result into a String called 'news' and then attempt to insert the result into a mySQL DB by some line of code, namely: stmt.executeQuery("INSERT INTO news VALUES(\"" + (String)session.getAttribute("login") + "\",NOW(),\"" + news.toString() + "\");"); [inserts the username, date, and text from the submitted textarea] Nothing will get inserted into the mySQL DB if the textarea contained as much as a _single_ double quotation mark. If I want to use double-quotation marks I have to escape it in the text area like so: this is a quotation mark \" I was wondering why this is. -ryan - Original Message - From: "Tagunov Anthony" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 11, 2001 7:58 AM Subject: Re: escaping text?? is it non-latin support question? Ryan wrote: I have made an update page where you place your news update in a textarea and then SUBMIT the textarea text to a jsp page via POST method. However, I want HTML to be supported. It is not very clear what you mean here, Ryan I was wondering what would be the best way to do this. I could escape the text on submission through javascript but what about people using lynx? what is the trouble? as far as i understand, IE and NS when it is needed escape chars by themselves.. i don't remember if the posted input fields are %-ed, but anyway IE/NS work in sync with Tomcat request.getParameter(), either both %-it, or both don't. Donno what lynx does. I also don't want to have to write my own escape function in java. Well, there's already static java.net.URLEncoder.encode(String s); - o - Maybe this question is about NLS and in particular about non-latin1 encodings support? Then this is a wired question. - o - Does anybody know, has there been any progress with this in Servlet 2.3 spec? Best regards, Tagunov Anthony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: escaping text?? is it non-latin support question?
Ryan wrote: I have made an update page where you place your news update in a textarea and then SUBMIT the textarea text to a jsp page via POST method. However, I want HTML to be supported. It is not very clear what you mean here, Ryan I was wondering what would be the best way to do this. I could escape the text on submission through javascript but what about people using lynx? what is the trouble? as far as i understand, IE and NS when it is needed escape chars by themselves.. i don't remember if the posted input fields are %-ed, but anyway IE/NS work in sync with Tomcat request.getParameter(), either both %-it, or both don't. Donno what lynx does. I also don't want to have to write my own escape function in java. Well, there's already static java.net.URLEncoder.encode(String s); - o - Maybe this question is about NLS and in particular about non-latin1 encodings support? Then this is a wired question. - o - Does anybody know, has there been any progress with this in Servlet 2.3 spec? Best regards, Tagunov Anthony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: escaping text?? is it non-latin support question?
Ryan wrote: I have made an update page where you place your news update in a textarea and then SUBMIT the textarea text to a jsp page via POST method. However, I want HTML to be supported. It is not very clear what you mean here, Ryan I was wondering what would be the best way to do this. I could escape the text on submission through javascript but what about people using lynx? what is the trouble? as far as i understand, IE and NS when it is needed escape chars by themselves.. i don't remember if the posted input fields are %-ed, but anyway IE/NS work in sync with Tomcat request.getParameter(), either both %-it, or both don't. Donno what lynx does. I also don't want to have to write my own escape function in java. Well, there's already static java.net.URLEncoder.encode(String s); - o - Maybe this question is about NLS and in particular about non-latin1 encodings support? Then this is a wired question. - o - Does anybody know, has there been any progress with this in Servlet 2.3 spec? Best regards, Tagunov Anthony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: escaping text?? is it non-latin support question?
Ryan wrote: I have made an update page where you place your news update in a textarea and then SUBMIT the textarea text to a jsp page via POST method. However, I want HTML to be supported. It is not very clear what you mean here, Ryan I was wondering what would be the best way to do this. I could escape the text on submission through javascript but what about people using lynx? what is the trouble? as far as i understand, IE and NS when it is needed escape chars by themselves.. i don't remember if the posted input fields are %-ed, but anyway IE/NS work in sync with Tomcat request.getParameter(), either both %-it, or both don't. Donno what lynx does. I also don't want to have to write my own escape function in java. Well, there's already static java.net.URLEncoder.encode(String s); - o - Maybe this question is about NLS and in particular about non-latin1 encodings support? Then this is a wired question. - o - Does anybody know, has there been any progress with this in Servlet 2.3 spec? Best regards, Tagunov Anthony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]