Skip to main content
March 17, 2009
Answered

Displaying info in input box messing up

  • March 17, 2009
  • 2 replies
  • 395 views
How can I make <cfinput type="text" name="dimension" maxlength="100" value="#product_dimensions#"> display my information properly if I have a " in the database field that get's pulled I only get the information prior to that ".
    This topic has been closed for replies.
    Correct answer Newsgroup_User
    Escape that ["] so that the HTML engine does not think it is a control
    character but rather recognizes it for the data it is supposed to be.
    This is done by doubling it in HTML, IIRC. I find it hard to keep track
    of all the different ways there are to escape data between the different
    technologies used to build a web page. Thus I love Google when I need
    to refresh my memory.

    You can do it manually with some basic string processing or use the
    htmlEditFormat(), htmlCodeFormat() or xmlFormat() functions designed for
    this type of functionality.

    2 replies

    Inspiring
    March 17, 2009
    Ian Skinner wrote:
    > This is done by doubling it in HTML, IIRC. ... Thus I love Google when I need
    > to refresh my memory.

    OR it is &quote;

    Told you I get confused!
    Newsgroup_UserCorrect answer
    Inspiring
    March 17, 2009
    Escape that ["] so that the HTML engine does not think it is a control
    character but rather recognizes it for the data it is supposed to be.
    This is done by doubling it in HTML, IIRC. I find it hard to keep track
    of all the different ways there are to escape data between the different
    technologies used to build a web page. Thus I love Google when I need
    to refresh my memory.

    You can do it manually with some basic string processing or use the
    htmlEditFormat(), htmlCodeFormat() or xmlFormat() functions designed for
    this type of functionality.