Everest Computers Blog About Computers and Web Design

When dealing with single and double quotes on the html or asp page, it is sometimes necessary to change them to so called character entity. Here’re the most common replacements I use:

& — &
‘ — ' or '
> — >
< — &lt;
” — &quot;

The character entities like &#39; obviously exist for other characters, they just need to be found on the net.

For some reason, &apos; doesn’t work but whe replacements with # (hash) do, so they should be used.

In order to replace the necessary character, in Java the following line can be added:

taskNotes = taskNotes.replaceAll(”‘”,”&#39;”);

Comments are closed.

 
Powered by WordPress |  Admin
Copyright © 2007 - 2009 Everest Computers: Computer Support & Web Design. All rights reserved.