Re: non SGML character escape
- From: Srini <Srinihello@xxxxxxxxx>
- Date: Wed, 18 Mar 2009 06:54:47 -0700 (PDT)
On Mar 18, 5:55 am, Sabine Dinis Blochberger <no.s...@xxxxxxxxxxxx>
wrote:
Srini wrote:
On Mar 16, 1:23 pm, Lew <l...@xxxxxxxxxxxxx> wrote:
Mark Space <marksp...@xxxxxxxxxxxxxx> wrote:
The technique I'm familiar with is to validate before it gets to the
database. If the validation fails, kick it back to the user with a big
red X and the error message "No dice."
More generally, always validate input.We can not really validate and ask the user to remove those because
user can copy from word directly into textarea. In that case how do we
validate?..... apache commons escapeHtml or Xml does not do that job
what is the workaround though?? This seem pretty common issue to me.
That problem can be "solved" by switching to UTF-8.
Or, at the *input* place, add validation/conversion. We had similar
problems in the past with the copy-pasting from MS word to the html
form, and invalid characters got through. Even though the database
should have rejected these (BLOB oddity I suspect). Major headache until
we used UTF-8 in everyhting.
Another possibility is to instruct users to paste to notepad first, then
copy-paste from there. They may or may not do it.
Some of the characters are not being escaped.... I suspect and these
are created in db when users simply copy and past from word or any
news web site.
Ex: "employee bonuses that members of Congress — and much of the
American public — find indefensible"
Characters like thick vertical lines in that above message causing
this error. (in textpad they appear like thick vertical lines but they
appear as diamond brackets in html page )
.
- Follow-Ups:
- Re: non SGML character escape
- From: Sabine Dinis Blochberger
- Re: non SGML character escape
- From: Lew
- Re: non SGML character escape
- References:
- non SGML character escape
- From: Srini
- Re: non SGML character escape
- From: Tom Anderson
- Re: non SGML character escape
- From: Srini
- Re: non SGML character escape
- From: Mark Space
- Re: non SGML character escape
- From: Lew
- Re: non SGML character escape
- From: Srini
- Re: non SGML character escape
- From: Sabine Dinis Blochberger
- non SGML character escape
- Prev by Date: Re: Webcam in browser
- Next by Date: Re: JSP login from only a single pc
- Previous by thread: Re: non SGML character escape
- Next by thread: Re: non SGML character escape
- Index(es):
Relevant Pages
|