HTML special characters in form input

In my site I store form input in my database. Before I store
the data, I parse out smart quotes, en dashes, and other extended
special characters and convert them into HTHML quivalents such as
’
All is well and good until the user goes to edit their info.
In my form these characters show up in my <input> tags as
their long-winded HTML equivalents, such as &#8217; instead of
a smart apostrophe.
Is there any way to convert these back to the special
characters from the HTML on the form input text fields so that
users can edit them without being confused?
Thanks.

Hmmm, well I ran the MX 6.1 updater and installed the two hot
fixes that had to do with null pointer exceptions and it still does
not work.
Here is the detailed error I'm getting, if it helps. Any more
ideas? Thanks again for the help, I'm really stuck on this one...
The system has attempted to use an undefined value, which
usually indicates a programming error, either in your code or some
system code.
Null Pointers are another name for undefined values.
The error occurred in C:\Inetpub\wwwroot\store\index.cfm:
line 1
1 : <cfquery name="getBooks" datasource="#dsn#">
2 : SELECT *
3 : FROM products
Please try the following:
* Check the ColdFusion documentation to verify that you are
using the correct syntax.
* Search the Knowledge Base to find a solution to your
problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
Remote Address 127.0.0.1
Referrer
Date/Time 09-Oct-07 02:20 PM
Stack Trace
at
cfindex2ecfm1770128649.runPage(C:\Inetpub\wwwroot\store\index.cfm:1)
java.lang.NullPointerException
at coldfusion.sql.QueryTable.populate(QueryTable.java:260)
at coldfusion.sql.QueryTable.populate(QueryTable.java:159)
at coldfusion.sql.Executive.getRowSet(Executive.java:505)
at coldfusion.sql.Executive.executeQuery(Executive.java:974)
at coldfusion.sql.Executive.executeQuery(Executive.java:886)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
at
coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:447)
at
cfindex2ecfm1770128649.runPage(C:\Inetpub\wwwroot\store\index.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62)
at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:24)
at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Similar Messages

  • Html special characters

    when using the Dreamweaver 'Set Text of Layer' behavior,
    Dreamweaver correctly converts all html
    special characters, such as accents like � and &,
    and quotes and double quotes, so that it is safe
    as a javascript string, and will display properly.
    I am trying to figure out what PHP function can do the same
    encoding, to simple text files (textEdit
    on the Mac).
    I have tried htmlentities(), but it does not work, accented
    letters like � just desappear from the
    string.
    I have tried htmlspecialchars() and it does not work
    either...
    I have tried about 10 others functions found on Google but
    nothing works.
    Anybody knows what exact function Dreamweaver uses to do this
    conversion?
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

    should be > to &gt;
    < to &lt;

  • OT: HTML Special Characters

    I often use HTML special characters in place of images.  Until now, I've had to search many sites to find the exact character and code desired.  This site has them all neatly organized for quick reference.  Way cool!
    http://ikwebdesigner.com/special-characters/
    ❄   ☃   ❄ 
    Season's Greetings!
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

    I know a lot of those that I use all of the time, but there are tons I've never used. This is a great holiday present, Nancy!
    -Mark

  • Convert HTML special characters to String

    Hi,
    I'm looking for an easy way to convert HTML special characters (like "&#246") to String.
    Any Ideas how implement this? Thanks

    Hi,
    I'm looking for an easy way to convert HTML special
    characters (like "�") to String.
    Any Ideas how implement this? Thankswell im assuming that you mean that when you are working with java you will be getting a ? instead of the character you want. assuming that you are reading and writing to this html file. if not well maybe this can stil help : BufferedReader inFile = new BufferedReader(new InputStreamReader(new FileInputStream(fileName),"ISO8859-1"));
    PrintWriter outFile = new PrintWriter(new OutputStreamWriter(new FileOutputStream(fileName2), "ISO8859-1")); basically you need to make sure that ou define ISO8859-1 as the encoding.

  • Chinese characters in form input

    FormsCentral appears to permit me to enter Chinese characters into the form template itself.
    It seems to permit only Latin characters to respond to the form.
    Is that a limitation of FormsCentral, or is it a function of the language for which the browser or computer are set?
    Any suggestions?
    Thanks!
    Mike Stolp
    China-USA Education Services LLC

    Just wanted to post a quick update. We just expanded our language to support 12 new languages. You can read more here.
    We support Japanese, but we don't officially support Chinese/Korean though they should work in most cases.
    Randy

  • HTML Special Characters Encoding

    Hi Guys,
    I have a problem with pasting contents from MS Word to messagetextinput. The double quotes becomes numbers or ? or different character. The quotes are smart quotes not the straight quotes. For example:
    I'll paste "TEST"
    Then when i paste it in messagetextinput, it is the same. Then saved it to database and when retrieved, it will display... &#8220;Test&#8221;...
    What can I do to solve this? Any suggestions?
    Please help. Thanks!

    maeve,
    Text copied from Word won't be plain ascii text but the formatted text which contains control characters. You should avoid copy, pasting from text formatters.
    I hope that the issue doesn't exist for text typed into the field.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error in DW5 on Using Insert-HTML-Special Characters-

    I'm getting an error which stops the process and reads:
    The following JavaScript error(s) occurred: Unable to open the script file "C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS5\Configuration\Objects\characters\jrtextformat.js" (error2).
    How do I fix this? Thanks.
    I'm using a 64-bit windows 7 system, DW version 11 build 4993. If I need to just replace the js file, where do I get it?
    Jeff

    Hi, already did and they don't work. I have a big project coming up,
    will probably uninstall after I finish. Thank you.
    Question: exactly which version of Java should I be using? This is a
    64-bit system.
    Jeff Berger, CEO
    JMB Communications
    www.websitesthatworkusa.com
    www.everythingsxm.com
    www.jmbcommunications.com
    (508) 830-3456
    P. O. Box 1812
    Plymouth, Massachusetts 02362-1812

  • Special characters in java, oracle and html

    Hi,
    I'm working on a mini content management system and need help with dealing with special characters.
    The input are taken from html form which are then stored into a varchar column in oracle database.
    When i retrieve the data, some of the special characters have been changed to ??? and also
    fields with double quote are modified.
    I believe there two issues;
    1. dealing with special characters
    2. display special characters back in html form textfield after retrieving.
    e.g.
    This is the line with "quote" saved to database
    This is the line with "quote" retrieved from database
    This is the line with displayed in html text field.
    Any help will be much appreciated.
    Thanks in advance.

    Maybe you should try this couple of classes: java.net.URLDecoder and java.net.URLEncoder
    Andres
    Best

  • Encoding HTML for use in forms

    This is probably a dumb question and is something I've probably overlooked in the API's, but before I write a huge block of code to deal with the problem, I thought I'd ask here first:
    I'm wrinting a form to add/edit records in a database. Is there an easy way to encode what a value to be inserted into a HTML document? e.g.
    <INPUT NAME="title" VALUE="[value to be inserted goes here]" />The actual pasing/insertion has already been coded, but the problem I have is I need something to encode the value before it is inserted. Why? If the value contains quotes, it will break the tag e.g.
    <INPUT NAME="title" VALUE="A value with "quotes" will break this tag" />In addition to this, in some cases I need to encode all HTML special characters ( <tag> to >tag< ) so that the following does not occur:
    <TEXTAREA NAME="post">
    You would think that it's safe to put anything in this block,
    but if some crafty bugger enters </TEXTAREA> in this field in the database,
    there's gonna be trouble...
    </TEXTAREA>And if I encode these tags I will, of course, need some way of decoding the tags too...
    This isn't too difficult a task, but I really don't want to write code to do this if it's already somewhere in the API since there's bound to be some oversights I havn't considered and blah blah blah. So is it in there?
    *** interesting note - this forum could do with something that deals with the </TEXTAREA> problem - I previewed this post and when I came back to edit it, the </TEXTAREA> tag broke the form. Typical...

    URLEncoder.encode() was what I looked at first - since it is designed for use with URL's (hence the name) it has several big drawbacks, formost of which is that all spaces are converted to "+" signs. Not good at all...
    As I originally said, what I require is a little more complex, and I was initially surprised at how little support there is in the API considering Java has such strong tie-ins with internet-related tech (especially with the recent popularity of servlets and JSP).
    Here is a brief example: in the database there is a record of a post, much like the forum posts you see here. The post has a title, and in this title the poster has thoughtfully included an ampersand(&):
    This is the title of my post & I think it's gonna give the Kid some headachesNaturally, I wanna encode the ampersand to &amp; Preferrably when the post is originally made. This is no big deal. What gets inserted into the database will be:
    This is the title of my post & I think it's gonna give the Kid some headachesSay at some point in the future the post will be edited, in the editing screen html there will be something like:
    title:<INPUT NAME="title" VALUE="This is the title of my post & I think it's gonna give the Kid some headaches" /><BR />Now, if you view that snippet of code in a browser, what you will see is an input box containing the text:
    This is the title of my post & I think it's gonna give the Kid some headachesSo I guess the string must be encoded again before it is inserted in the VALUE="" of the the INPUT tag. Also, not a big deal (though I have to remember not to encode the string when it is not being used in an input tag - otherwise it will ALWAYS be displayed as &amp;)
    A side note is that other ampersand escaped characters get screwed up when encoding them twice i.e &quote; ends up getting saved as &amp;quote;, which is something that I don't want. The code to get around this is simple, but I resent having to write it as I see it as being an essential method when outputting html and should, in my opinion, be included somewhere in the API.
    Anyway, that has already been done and works fine. Now I'm working on parsing the passed post so that only the <tags> that I want to be allowed are left unchanged, and the rest of the &lt;tags&gt; are encoded (including the dreaded </TEXTAREA>). There's precious little hope that there's anything out there that will do this for me, but it was worth asking before I started...
    Cheers for your interest.
    Note: writing this post has been a king-sized pain in the arse since I had to make sure all the &'s were written as &amp; and all the &amp; written as &amp;amp; - nightmarish.

  • Special characters are not displaying in ADF jsp page

    Hi All,
    By using ADF view controller,I am getting the data from database table but when I display the data in jsp page after special character < what ever the data is there it is not displaced.Provide any suggestions.
    Thanks in Advance
    Mani

    Hi Mani,
    < is a special HTML character and obviously it may not me displayed correctly.
    Here is a reference of all HTML special characters: http://www.w3schools.com/tags/ref_entities.asp
    In your case you can replace < with its special symbol representation - *&amp;#60; or &amp;lt;*
    I also advice you to do so for all special HTML characters.
    You can use this Java library for that purpose : http://commons.apache.org/lang/api/org/apache/commons/lang3/StringEscapeUtils.html
    Nikolay

  • Regd: Handling of special characters in XML

    Hi ALL,
    i am using java mapping to conevrt IDOC XML to Flat file using SAX parse and then reading the whole content into a single Filed,the output of the java mapping is the input for graphical mapping .
    My problem is there may be some special characters  in the input IDOC. when ever these special characters come my java mapping is not able to Parse the IDOC.
    Please let me know how can handle this special characters.
    Thanks,
    hemanth.

    Hi ,
            Java has some characters reserved which is normally used to declare the Entity Name. To handle such kind of situations, you can replace these characters with these special characters, which get substituted automatically while parsing the XML file.
    Refer:
    http://www.javacommerce.com/displaypage.jsp?name=saxparser3.sql&id=18232
    I hope it helps.
    Regards,
    Anurag Gargh
    Edited by: Anurag Gargh on Aug 11, 2009 3:41 PM

  • How to type diactrics (special characters)

    Short of installing a localized version of OS X, is there any way to type diacritics on a Mac? I'm mostly intersted in Polish special characters: ą ę ł ó ś ż ż.

    In the "Input Menu" of "International" Systems Preference, turn on "Character Palette" and "Keyboard Viewer", and enable "Show input menu in menu bar" (it's at the bottom of the window). This will put a flag icon in the menu bar to select the Keyboard Viewer and/or the Character Palette.
    For the simpler diacriticals ( ` ´ ¨ ˆ ˜ ) hold down Option, press the diacritical key, as shown in the Keyboard Viewer), release Option, then type the character.
    ` e u i n will give ` ´ ¨ ˆ ˜
    For other diacriticals you will need the Character Palette. "Latin" under "European Scripts" should have what you need. You can use the "Add to Favorites" function (press the little gear at the lower-left) for the ones you use most, then select "Favorites".

  • Special characters and text positioning

    Hello Experts,
    In Dreamweaver, in inline text, I need to change a TM mark
    for a registered trademark symbol (a capital R inside a circle),
    and it must be raised above the text baseline -- superscript, I
    believe they call it.
    I found the Registered symbol in Insert > HTML >
    Special Characters. but I can't find a way to raise it above the
    baseline.
    Can anyone help?
    Many thanks for tips.
    Richard

    Bonnie wrote:
    > Thanks, Ade! (Was a dirty stop-out last night and had a
    shameful lie-in
    > this a.m.)
    No worries, we expect nothing less from you, Bonnie. ;)
    Cheers jojo
    Adobe Community Expert for Dreamweaver 8
    http://www.webade.co.uk
    http://www.ukcsstraining.co.uk/
    Extending Knowledge, Daily.
    http://www.communityMX.com/
    Free 10 day trial
    http://www.communitymx.com/joincmx.cfm

  • How to convert special characters like #, &, etc occuring in the input string

    Hi,
              I am using method 'Get' to submit a form . When ever there is any
              special character like '#' in my input For example "033#Test", nothing
              gets posted beyond 033.
              Can any one please let me know how do I overcome this problem.
              Thanks in advance.
              Regards,
              Moin
              

    Moinuddin:
              It seems possible your browser may be confused by the fact that 033 is
              the octal representation for an ESCape character (Hex 1B). Try dropping
              the leading zero. In addition, it is usually better to represent special
              characters like the hash mark "#" using HTML character entities instead
              of literals, i.e. &#35; = hash mark
              Regards,
              Jim Brown
              Moinuddin Ahmed wrote:
              >
              > Hi,
              > I am using method 'Get' to submit a form . When ever there is any
              > special character like '#' in my input For example "033#Test", nothing
              > gets posted beyond 033.
              >
              > Can any one please let me know how do I overcome this problem.
              >
              > Thanks in advance.
              > Regards,
              > Moin
              Jim Brown
              Developer Relations Engineer
              BEA Support
              

  • Forms and Czech special characters

    Hello everybody,
    I created a form to update calendar events. I used Czech language to made labels of inputs in the form. Czech special characters aren't display correctly. Others applications, pages and CAs are OK. Just I have problems with forms. The characters are replaced with senseless characters and if I save the form again, the sensless characters are added. So I have longer and longer strings there.
    I found that the labels are saved in the table "WWA_FORM_ITEMS$". So I changed them directly in this table. But you know, it's annoying.
    Does anybody knows if there is more comfortable solution?
    I'm using Portal 3.0.8 and database 8.1.7.
    Thanks for any answer. You can use also this address: [email protected]
    Petra :)

    again.
    Hi Petra,
    i've had the same problem with german characters. As far as I know it is a bug
    (either in Portal or in Interner Explorer).
    You can use Netscape to design your forms or (that's how I do it) use the
    html equivalent for your letter. For example instead of "&auml;" (or d) use "& a u m l ;"
    (without the blanks - I hope that this will be displayed correctly).
    Regards Oliver

Maybe you are looking for