RE: Writing a file with CFFILE
Okay, so it's just as f***ed... or actually more-so because now I need a solution to the native solution, because if I'm right about the results I got this means no-one can enter html entities in form fields in CF and get html entities on the action page, whether they're using htmleditformat() or not: <textarea name="display" cols="40" rows="5"></textarea> #form.html# Try this (I'm using CF 5 Win2K Server IIS 5) -- save it a couple times, you'll see what I was saying about the other half of the problem. You can't put html entities in the form and have them save as html entities. So it's actually worse than I thought it was, because once the form field has been submitted and all the html entities have been converted back to <>" etc there's no way to distinguish what was supposed to be html from what was supposed to be entities. That's a real good way to move forward with XML and XHTML. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > Run the code... then tell me it still won't work that way. > Is it possible > you're wrong? > Steve > -Original Message----- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 1:53 PM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > umm... no ... > htmleditformat() converts potentially harmful characters ( > <,> " etc ) into > html entities. An html entity is used to place characters > in the display of > an html page which aren't supposed to be allowed ( > although browsers often > if not usually allow them anyway ) in an html document > without being part of > an html tag. htmleditformat(0 is a one-way conversion. You > can of course, > unhtmleditformat() a variable manually, however, doing so > prevents you from > placing proper html entities in the field since they would > likely all be > converted back into the <>" etc which aren't supposed to > appear in properly > formatted html documents. > > > > > myvar = #myvar# > htmleditformat(myvar) = > #htmleditformat(myvar)# > > since these 2 lines are not the same, and the contents of > a textarea field > are passed literally ( they're not translated by the form > submission ), the > content of myvar becomes what you see on line 2 after it's > been converted > the first time with htmleditformat(). > Unless this is a very new feature of CFMX that I've not > heard about which > automatically reverts the string after a form submission. > Although I would > doubt it considering that this would prevent people being > able to enter html > entities into form fields and get html entities on the > action page. > Off the top of my head, I'm not sure what's up with your > example -- I > haven't tested it on my machine. If it is working, one of > two things are > happening -- there's more code involved than in your > example ( an > application.cfm maybe ) _or_ there's a bug somewhere, > because it's not > supposed to work that way. > s. isaac dealey954-776-0046 > new epoch http://www.turnkey.to > lead architect, tapestry cms http://products.turnkey.to > certified advanced coldfusion 5 developer > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 >> Actually yes. Run this code in a blank page and save >> all day. Check >> the >> results in studio. As was my original problem, you are >> over thinking this. >> This is exactly what HTMLEditFormat() was designed for. >> Hope this clear up >> the confusion >> >> >> > output="#form.display#" >> addnewline="Yes"> >> >> > variable="output"> >> > action="#SCRIPT_NAME#" >> method="post"> >> > style="width:500px;height:400px">#HTMLEditForma >> t(output)#> pu >> t> >> >> >> >> Steve >> -Original Message- >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, November 26, 2002 1:05 PM >> To: CF-Talk >> Subject: RE: Writing a file with CFFILE >> umm... no ... >> Try this >> > value="#htmleditformat(myvar)#"> >> Then type 'Jim &qu
RE: Writing a file with CFFILE
Run the code... then tell me it still won't work that way. Is it possible you're wrong? Steve -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 1:53 PM To: CF-Talk Subject: RE: Writing a file with CFFILE umm... no ... htmleditformat() converts potentially harmful characters ( <,> " etc ) into html entities. An html entity is used to place characters in the display of an html page which aren't supposed to be allowed ( although browsers often if not usually allow them anyway ) in an html document without being part of an html tag. htmleditformat(0 is a one-way conversion. You can of course, unhtmleditformat() a variable manually, however, doing so prevents you from placing proper html entities in the field since they would likely all be converted back into the <>" etc which aren't supposed to appear in properly formatted html documents. myvar = #myvar# htmleditformat(myvar) = #htmleditformat(myvar)# since these 2 lines are not the same, and the contents of a textarea field are passed literally ( they're not translated by the form submission ), the content of myvar becomes what you see on line 2 after it's been converted the first time with htmleditformat(). Unless this is a very new feature of CFMX that I've not heard about which automatically reverts the string after a form submission. Although I would doubt it considering that this would prevent people being able to enter html entities into form fields and get html entities on the action page. Off the top of my head, I'm not sure what's up with your example -- I haven't tested it on my machine. If it is working, one of two things are happening -- there's more code involved than in your example ( an application.cfm maybe ) _or_ there's a bug somewhere, because it's not supposed to work that way. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > Actually yes. Run this code in a blank page and save all day. Check > the > results in studio. As was my original problem, you are over thinking this. > This is exactly what HTMLEditFormat() was designed for. Hope this clear up > the confusion > > > addnewline="Yes"> > > > method="post"> > style="width:500px;height:400px">#HTMLEditFormat(output)# pu > t> > > > > Steve > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 1:05 PM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > umm... no ... > Try this > > Then type 'Jim "the Man" davis' into that form field, drop it into a > persistent variable or a database, retrieve it from that location and > populate the form with it (as above), submit the form and save it to the > same place. It _does_ change the content. You wind up with 'Jim "the > Man" Davis' as your content. > I've seen people sometimes use ReplaceNoCase() to convert " and other > html entities into double-quotes on the action page, but then no-one can > enter an html entity in the form field, because those get converted. > It's a lose-lose situation. > Same story with textareas. > #mytextarea# > Do the same thing you did with the text field here, only instead of > double-quotes, this time enter ' name="somethingelse">' > into the field. After you've edited it once, you no longer have html > content > you now have <textarea > name="somethingelse"></textarea> ... > I don't make this stuff up. > s. isaac dealey954-776-0046 > new epoch http://www.turnkey.to > lead architect, tapestry cms http://products.turnkey.to > certified advanced coldfusion 5 developer > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 >> Yes...it is. I am using just as you described and it is perfect! >> Thanks, >> Steve >> -Original Message- >> From: Kwang Suh [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, November 26, 2002 10:51 AM >> To: CF-Talk >> Subject: RE: Writing a file with CFFILE >> Used properly, HTMLEditFormat() does not change the content. >> If you type "Hello & Goodbye", into a form field, once submitted, it >> becomes: >> "Hello & Goodbye" >> So, this is what you insert into the database. >> Now, when you *display* the contents of that form field, *if* you *don'
RE: Writing a file with CFFILE
No, it doesn't. Jeez, I use this function every time I have a form element - including - and it ALWAYS works properly. Otherwise, how in God's name are you ever going to be able to edit: Hello "There"? You HAVE to escape the quotes in the value attribute of an input field - or else the tag breaks. Try it out. It WORKS. > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 11:53 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > umm... no ... > > htmleditformat() converts potentially harmful characters ( <,> " > etc ) into > html entities. An html entity is used to place characters in the > display of > an html page which aren't supposed to be allowed ( although browsers often > if not usually allow them anyway ) in an html document without > being part of > an html tag. htmleditformat(0 is a one-way conversion. You can of course, > unhtmleditformat() a variable manually, however, doing so > prevents you from > placing proper html entities in the field since they would likely all be > converted back into the <>" etc which aren't supposed to appear > in properly > formatted html documents. > > > > > > > myvar = #myvar# > htmleditformat(myvar) = #htmleditformat(myvar)# > > > since these 2 lines are not the same, and the contents of a textarea field > are passed literally ( they're not translated by the form > submission ), the > content of myvar becomes what you see on line 2 after it's been converted > the first time with htmleditformat(). > > Unless this is a very new feature of CFMX that I've not heard about which > automatically reverts the string after a form submission. Although I would > doubt it considering that this would prevent people being able to > enter html > entities into form fields and get html entities on the action page. > > Off the top of my head, I'm not sure what's up with your example -- I > haven't tested it on my machine. If it is working, one of two things are > happening -- there's more code involved than in your example ( an > application.cfm maybe ) _or_ there's a bug somewhere, because it's not > supposed to work that way. > > s. isaac dealey954-776-0046 > > new epoch http://www.turnkey.to > > lead architect, tapestry cms http://products.turnkey.to > > certified advanced coldfusion 5 developer > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > > > > > Actually yes. Run this code in a blank page and save all day. Check > > the > > results in studio. As was my original problem, you are over > thinking this. > > This is exactly what HTMLEditFormat() was designed for. Hope > this clear up > > the confusion > > > > > > > > addnewline="Yes"> > > > > > > > method="post"> > > > > style="width:500px;height:400px">#HTMLEditFormat(output)# > pu > > t> > > > > > > > > > Steve > > > > -Original Message- > > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, November 26, 2002 1:05 PM > > To: CF-Talk > > Subject: RE: Writing a file with CFFILE > > > > umm... no ... > > > Try this > > > > > > Then type 'Jim "the Man" davis' into that form field, drop it into a > > persistent variable or a database, retrieve it from that location and > > populate the form with it (as above), submit the form and save it to the > > same place. It _does_ change the content. You wind up with 'Jim > "the > > Man" Davis' as your content. > > > I've seen people sometimes use ReplaceNoCase() to convert > " and other > > html entities into double-quotes on the action page, but then no-one can > > enter an html entity in the form field, because those get converted. > > > It's a lose-lose situation. > > > Same story with textareas. > > > #mytextarea# > > > Do the same thing you did with the text field here, only instead of > > double-quotes, this time enter ' > name="somethingelse">' > > into the field. After you've edited it once, you no longer have html > > content > > you now have <textarea > > name="somethingelse"></textarea> ... > > > I don't make this stuff up. > > > s. isaac dealey954-776-0046 > > > new epoch http://w
RE: Writing a file with CFFILE
umm... no ... htmleditformat() converts potentially harmful characters ( <,> " etc ) into html entities. An html entity is used to place characters in the display of an html page which aren't supposed to be allowed ( although browsers often if not usually allow them anyway ) in an html document without being part of an html tag. htmleditformat(0 is a one-way conversion. You can of course, unhtmleditformat() a variable manually, however, doing so prevents you from placing proper html entities in the field since they would likely all be converted back into the <>" etc which aren't supposed to appear in properly formatted html documents. myvar = #myvar# htmleditformat(myvar) = #htmleditformat(myvar)# since these 2 lines are not the same, and the contents of a textarea field are passed literally ( they're not translated by the form submission ), the content of myvar becomes what you see on line 2 after it's been converted the first time with htmleditformat(). Unless this is a very new feature of CFMX that I've not heard about which automatically reverts the string after a form submission. Although I would doubt it considering that this would prevent people being able to enter html entities into form fields and get html entities on the action page. Off the top of my head, I'm not sure what's up with your example -- I haven't tested it on my machine. If it is working, one of two things are happening -- there's more code involved than in your example ( an application.cfm maybe ) _or_ there's a bug somewhere, because it's not supposed to work that way. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > Actually yes. Run this code in a blank page and save all day. Check > the > results in studio. As was my original problem, you are over thinking this. > This is exactly what HTMLEditFormat() was designed for. Hope this clear up > the confusion > > > addnewline="Yes"> > > > method="post"> > style="width:500px;height:400px">#HTMLEditFormat(output)# pu > t> > > > > Steve > -----Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 1:05 PM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > umm... no ... > Try this > > Then type 'Jim "the Man" davis' into that form field, drop it into a > persistent variable or a database, retrieve it from that location and > populate the form with it (as above), submit the form and save it to the > same place. It _does_ change the content. You wind up with 'Jim "the > Man" Davis' as your content. > I've seen people sometimes use ReplaceNoCase() to convert " and other > html entities into double-quotes on the action page, but then no-one can > enter an html entity in the form field, because those get converted. > It's a lose-lose situation. > Same story with textareas. > #mytextarea# > Do the same thing you did with the text field here, only instead of > double-quotes, this time enter ' name="somethingelse">' > into the field. After you've edited it once, you no longer have html > content > you now have <textarea > name="somethingelse"></textarea> ... > I don't make this stuff up. > s. isaac dealey954-776-0046 > new epoch http://www.turnkey.to > lead architect, tapestry cms http://products.turnkey.to > certified advanced coldfusion 5 developer > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 >> Yes...it is. I am using just as you described and it is perfect! >> Thanks, >> Steve >> -Original Message- >> From: Kwang Suh [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, November 26, 2002 10:51 AM >> To: CF-Talk >> Subject: RE: Writing a file with CFFILE >> Used properly, HTMLEditFormat() does not change the content. >> If you type "Hello & Goodbye", into a form field, once submitted, it >> becomes: >> "Hello & Goodbye" >> So, this is what you insert into the database. >> Now, when you *display* the contents of that form field, *if* you *don't* >> want the browser to parse it, then use HTMLEditFormat(). >> For instance, let's say we let the user edit that text again in a form >> field. Using HTMLEditFormat() within the value attribute of a form >> field, >> you will get: >&g
RE: Writing a file with CFFILE
Actually yes. Run this code in a blank page and save all day. Check the results in studio. As was my original problem, you are over thinking this. This is exactly what HTMLEditFormat() was designed for. Hope this clear up the confusion #HTMLEditFormat(output)# Steve -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 1:05 PM To: CF-Talk Subject: RE: Writing a file with CFFILE umm... no ... Try this Then type 'Jim "the Man" davis' into that form field, drop it into a persistent variable or a database, retrieve it from that location and populate the form with it (as above), submit the form and save it to the same place. It _does_ change the content. You wind up with 'Jim "the Man" Davis' as your content. I've seen people sometimes use ReplaceNoCase() to convert " and other html entities into double-quotes on the action page, but then no-one can enter an html entity in the form field, because those get converted. It's a lose-lose situation. Same story with textareas. #mytextarea# Do the same thing you did with the text field here, only instead of double-quotes, this time enter '' into the field. After you've edited it once, you no longer have html content you now have <textarea name="somethingelse"></textarea> ... I don't make this stuff up. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > Yes...it is. I am using just as you described and it is perfect! > Thanks, > Steve > -Original Message- > From: Kwang Suh [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 10:51 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > Used properly, HTMLEditFormat() does not change the content. > If you type "Hello & Goodbye", into a form field, once submitted, it > becomes: > "Hello & Goodbye" > So, this is what you insert into the database. > Now, when you *display* the contents of that form field, *if* you *don't* > want the browser to parse it, then use HTMLEditFormat(). > For instance, let's say we let the user edit that text again in a form > field. Using HTMLEditFormat() within the value attribute of a form field, > you will get: > "Hello & Goodbye" > *But* when the form is submitted, you get: > "Hello & Goodbye" > Using HTMLEditFormat() *is* the perfect, easy solution! >> -Original Message- >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, November 26, 2002 7:36 AM >> To: CF-Talk >> Subject: RE: Writing a file with CFFILE >> >> >> You mean enabled -- or doesn't disable js... This is true -- but it's the >> only way I know of to preserve the original format of the text, including >> html, and allow it to be updated after the fact. HTMLEditFormat() or any >> other kind of string manipulation going into the form field will >> change the >> content in some way after the first edit. So there really is no perfect >> solution -- either you lose the original format, or you rely on >> javascript >> which could potentially be disabled. >> >> > Unless the client has JS disabled. Then this method won't >> > work at all. >> >> > -- >> > Mosh Teitelbaum >> > evoch, LLC >> > Tel: (301) 625-9191 >> > Fax: (301) 933-3651 >> > Email: [EMAIL PROTECTED] >> > WWW: http://www.evoch.com/ >> >> >> >> -Original Message- >> >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] >> >> Sent: Monday, November 25, 2002 11:07 PM >> >> To: CF-Talk >> >> Subject: RE: Writing a file with CFFILE >> >> >> >> >> >> Not necessarily. Assuming you want to be able to enter >> >> text areas and the >> >> like (or any html actually) in your textarea, using >> >> htmledit format will >> >> allow you to enter it once -- but never update it after >> >> the fact because >> >> when you save it the 2nd time, it's no longer html code. >> >> The email I just >> >> sent off a moment ago explains a method (afaik the only >> >> method) of >> >> preserving the content in its original format, so it's >> >> still >> >> viable as html >> >> even after it's been saved several times. >> >> >
RE: Writing a file with CFFILE
This is wrong. Are you, per chance, using htmlEditFormat() in the database query? > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 11:05 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > umm... no ... > > Try this > > > > Then type 'Jim "the Man" davis' into that form field, drop it into a > persistent variable or a database, retrieve it from that location and > populate the form with it (as above), submit the form and save it to the > same place. It _does_ change the content. You wind up with 'Jim "the > Man" Davis' as your content. > > I've seen people sometimes use ReplaceNoCase() to convert " and other > html entities into double-quotes on the action page, but then no-one can > enter an html entity in the form field, because those get converted. > > It's a lose-lose situation. > > Same story with textareas. > > #mytextarea# > > Do the same thing you did with the text field here, only instead of > double-quotes, this time enter ' name="somethingelse">' > into the field. After you've edited it once, you no longer have > html content > you now have <textarea > name="somethingelse"></textarea> ... > > I don't make this stuff up. > > s. isaac dealey954-776-0046 > > new epoch http://www.turnkey.to > > lead architect, tapestry cms http://products.turnkey.to > > certified advanced coldfusion 5 developer > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > > > > > Yes...it is. I am using just as you described and it is perfect! > > > Thanks, > > Steve > > > -Original Message- > > From: Kwang Suh [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, November 26, 2002 10:51 AM > > To: CF-Talk > > Subject: RE: Writing a file with CFFILE > > > > Used properly, HTMLEditFormat() does not change the content. > > > If you type "Hello & Goodbye", into a form field, once submitted, it > > becomes: > > > "Hello & Goodbye" > > > So, this is what you insert into the database. > > > Now, when you *display* the contents of that form field, *if* > you *don't* > > want the browser to parse it, then use HTMLEditFormat(). > > > For instance, let's say we let the user edit that text again in a form > > field. Using HTMLEditFormat() within the value attribute of a > form field, > > you will get: > > > "Hello & Goodbye" > > > *But* when the form is submitted, you get: > > > "Hello & Goodbye" > > > Using HTMLEditFormat() *is* the perfect, easy solution! > > >> -Original Message- > >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > >> Sent: Tuesday, November 26, 2002 7:36 AM > >> To: CF-Talk > >> Subject: RE: Writing a file with CFFILE > >> > >> > >> You mean enabled -- or doesn't disable js... This is true -- > but it's the > >> only way I know of to preserve the original format of the > text, including > >> html, and allow it to be updated after the fact. > HTMLEditFormat() or any > >> other kind of string manipulation going into the form field will > >> change the > >> content in some way after the first edit. So there really is no perfect > >> solution -- either you lose the original format, or you rely on > >> javascript > >> which could potentially be disabled. > >> > >> > Unless the client has JS disabled. Then this method won't > >> > work at all. > >> > >> > -- > >> > Mosh Teitelbaum > >> > evoch, LLC > >> > Tel: (301) 625-9191 > >> > Fax: (301) 933-3651 > >> > Email: [EMAIL PROTECTED] > >> > WWW: http://www.evoch.com/ > >> > >> > >> >> -Original Message- > >> >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > >> >> Sent: Monday, November 25, 2002 11:07 PM > >> >> To: CF-Talk > >> >> Subject: RE: Writing a file with CFFILE > >> >> > >> >> > >> >> Not necessarily. Assuming you want to be able to enter > >> >> text areas and the > >> >> like (or any html actually) in your textarea, using > >> >> htmledit format will > >> >> allow you to enter it once -- but never update it after > >> &
RE: Writing a file with CFFILE
#mytextarea# Oops... I left out the htmleditformat() #htmleditformat(mytextarea)# Isaac ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: Writing a file with CFFILE
umm... no ... Try this Then type 'Jim "the Man" davis' into that form field, drop it into a persistent variable or a database, retrieve it from that location and populate the form with it (as above), submit the form and save it to the same place. It _does_ change the content. You wind up with 'Jim "the Man" Davis' as your content. I've seen people sometimes use ReplaceNoCase() to convert " and other html entities into double-quotes on the action page, but then no-one can enter an html entity in the form field, because those get converted. It's a lose-lose situation. Same story with textareas. #mytextarea# Do the same thing you did with the text field here, only instead of double-quotes, this time enter '' into the field. After you've edited it once, you no longer have html content you now have <textarea name="somethingelse"></textarea> ... I don't make this stuff up. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > Yes...it is. I am using just as you described and it is perfect! > Thanks, > Steve > -Original Message- > From: Kwang Suh [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 10:51 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > Used properly, HTMLEditFormat() does not change the content. > If you type "Hello & Goodbye", into a form field, once submitted, it > becomes: > "Hello & Goodbye" > So, this is what you insert into the database. > Now, when you *display* the contents of that form field, *if* you *don't* > want the browser to parse it, then use HTMLEditFormat(). > For instance, let's say we let the user edit that text again in a form > field. Using HTMLEditFormat() within the value attribute of a form field, > you will get: > "Hello & Goodbye" > *But* when the form is submitted, you get: > "Hello & Goodbye" > Using HTMLEditFormat() *is* the perfect, easy solution! >> -Original Message- >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, November 26, 2002 7:36 AM >> To: CF-Talk >> Subject: RE: Writing a file with CFFILE >> >> >> You mean enabled -- or doesn't disable js... This is true -- but it's the >> only way I know of to preserve the original format of the text, including >> html, and allow it to be updated after the fact. HTMLEditFormat() or any >> other kind of string manipulation going into the form field will >> change the >> content in some way after the first edit. So there really is no perfect >> solution -- either you lose the original format, or you rely on >> javascript >> which could potentially be disabled. >> >> > Unless the client has JS disabled. Then this method won't >> > work at all. >> >> > -- >> > Mosh Teitelbaum >> > evoch, LLC >> > Tel: (301) 625-9191 >> > Fax: (301) 933-3651 >> > Email: [EMAIL PROTECTED] >> > WWW: http://www.evoch.com/ >> >> >> >> -Original Message- >> >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] >> >> Sent: Monday, November 25, 2002 11:07 PM >> >> To: CF-Talk >> >> Subject: RE: Writing a file with CFFILE >> >> >> >> >> >> Not necessarily. Assuming you want to be able to enter >> >> text areas and the >> >> like (or any html actually) in your textarea, using >> >> htmledit format will >> >> allow you to enter it once -- but never update it after >> >> the fact because >> >> when you save it the 2nd time, it's no longer html code. >> >> The email I just >> >> sent off a moment ago explains a method (afaik the only >> >> method) of >> >> preserving the content in its original format, so it's >> >> still >> >> viable as html >> >> even after it's been saved several times. >> >> >> >> > Nevermind... I'm an idiot over thinking the basics... >> >> > HTMLEditFormat()..! >> >> >> >> > hehe, >> >> > Steve >> >> >> >> > -Original Message- >> >> > From: Steve Reich [mailto:[EMAIL PROTECTED]] >> >> > Sent: Monday, November 25, 2002 9:26 PM >> >> > To: CF-Talk >> >&g
RE: Writing a file with CFFILE
Yes...it is. I am using just as you described and it is perfect! Thanks, Steve -Original Message- From: Kwang Suh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 10:51 AM To: CF-Talk Subject: RE: Writing a file with CFFILE Used properly, HTMLEditFormat() does not change the content. If you type "Hello & Goodbye", into a form field, once submitted, it becomes: "Hello & Goodbye" So, this is what you insert into the database. Now, when you *display* the contents of that form field, *if* you *don't* want the browser to parse it, then use HTMLEditFormat(). For instance, let's say we let the user edit that text again in a form field. Using HTMLEditFormat() within the value attribute of a form field, you will get: "Hello & Goodbye" *But* when the form is submitted, you get: "Hello & Goodbye" Using HTMLEditFormat() *is* the perfect, easy solution! > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 7:36 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > You mean enabled -- or doesn't disable js... This is true -- but it's the > only way I know of to preserve the original format of the text, including > html, and allow it to be updated after the fact. HTMLEditFormat() or any > other kind of string manipulation going into the form field will > change the > content in some way after the first edit. So there really is no perfect > solution -- either you lose the original format, or you rely on javascript > which could potentially be disabled. > > > Unless the client has JS disabled. Then this method won't > > work at all. > > > -- > > Mosh Teitelbaum > > evoch, LLC > > Tel: (301) 625-9191 > > Fax: (301) 933-3651 > > Email: [EMAIL PROTECTED] > > WWW: http://www.evoch.com/ > > > >> -Original Message- > >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > >> Sent: Monday, November 25, 2002 11:07 PM > >> To: CF-Talk > >> Subject: RE: Writing a file with CFFILE > >> > >> > >> Not necessarily. Assuming you want to be able to enter > >> text areas and the > >> like (or any html actually) in your textarea, using > >> htmledit format will > >> allow you to enter it once -- but never update it after > >> the fact because > >> when you save it the 2nd time, it's no longer html code. > >> The email I just > >> sent off a moment ago explains a method (afaik the only > >> method) of > >> preserving the content in its original format, so it's > >> still > >> viable as html > >> even after it's been saved several times. > >> > >> > Nevermind... I'm an idiot over thinking the basics... > >> > HTMLEditFormat()..! > >> > >> > hehe, > >> > Steve > >> > >> > -Original Message- > >> > From: Steve Reich [mailto:[EMAIL PROTECTED]] > >> > Sent: Monday, November 25, 2002 9:26 PM > >> > To: CF-Talk > >> > Subject: RE: Writing a file with CFFILE > >> > >> > >> >> I'm guessing you're using MX ... Probably using > >> >> setEncoding() whether you > >> >> specify ISO latin or UTF-8 on the form scope on the > >> >> action page will > >> > resolve > >> >> the issue... I'd likely place it in the > >> >> application.cfm > >> >> and apply it to > >> > both > >> >> form and url. > >> > >> > >> > Thanks! That fixed that problem. I have another one > >> > now > >> > >> > If I call a file like this... > >> > >> > > >> > >> > . then display it like this > >> > >> > >> > name="contents">#output# >> > > > >> > >> > . I run into a problem if the variable output has a > >> > textarea tag contained > >> > within it. It sees the closing textarea tag in the > >> > output > >> > variable as the > >> > closing tag for the textarea used to display the > >> > variable. > >> > All code after > >> > the closing textarea is executed in the browser. > >> > >> > Example: > >> > >> > output = This is some > >> > textThen some > &
RE: Writing a file with CFFILE
Used properly, HTMLEditFormat() does not change the content. If you type "Hello & Goodbye", into a form field, once submitted, it becomes: "Hello & Goodbye" So, this is what you insert into the database. Now, when you *display* the contents of that form field, *if* you *don't* want the browser to parse it, then use HTMLEditFormat(). For instance, let's say we let the user edit that text again in a form field. Using HTMLEditFormat() within the value attribute of a form field, you will get: "Hello & Goodbye" *But* when the form is submitted, you get: "Hello & Goodbye" Using HTMLEditFormat() *is* the perfect, easy solution! > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 7:36 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > You mean enabled -- or doesn't disable js... This is true -- but it's the > only way I know of to preserve the original format of the text, including > html, and allow it to be updated after the fact. HTMLEditFormat() or any > other kind of string manipulation going into the form field will > change the > content in some way after the first edit. So there really is no perfect > solution -- either you lose the original format, or you rely on javascript > which could potentially be disabled. > > > Unless the client has JS disabled. Then this method won't > > work at all. > > > -- > > Mosh Teitelbaum > > evoch, LLC > > Tel: (301) 625-9191 > > Fax: (301) 933-3651 > > Email: [EMAIL PROTECTED] > > WWW: http://www.evoch.com/ > > > >> -Original Message- > >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > >> Sent: Monday, November 25, 2002 11:07 PM > >> To: CF-Talk > >> Subject: RE: Writing a file with CFFILE > >> > >> > >> Not necessarily. Assuming you want to be able to enter > >> text areas and the > >> like (or any html actually) in your textarea, using > >> htmledit format will > >> allow you to enter it once -- but never update it after > >> the fact because > >> when you save it the 2nd time, it's no longer html code. > >> The email I just > >> sent off a moment ago explains a method (afaik the only > >> method) of > >> preserving the content in its original format, so it's > >> still > >> viable as html > >> even after it's been saved several times. > >> > >> > Nevermind... I'm an idiot over thinking the basics... > >> > HTMLEditFormat()..! > >> > >> > hehe, > >> > Steve > >> > >> > -Original Message- > >> > From: Steve Reich [mailto:[EMAIL PROTECTED]] > >> > Sent: Monday, November 25, 2002 9:26 PM > >> > To: CF-Talk > >> > Subject: RE: Writing a file with CFFILE > >> > >> > >> >> I'm guessing you're using MX ... Probably using > >> >> setEncoding() whether you > >> >> specify ISO latin or UTF-8 on the form scope on the > >> >> action page will > >> > resolve > >> >> the issue... I'd likely place it in the > >> >> application.cfm > >> >> and apply it to > >> > both > >> >> form and url. > >> > >> > >> > Thanks! That fixed that problem. I have another one > >> > now > >> > >> > If I call a file like this... > >> > >> > > >> > >> > . then display it like this > >> > >> > >> > name="contents">#output# >> > > > >> > >> > . I run into a problem if the variable output has a > >> > textarea tag contained > >> > within it. It sees the closing textarea tag in the > >> > output > >> > variable as the > >> > closing tag for the textarea used to display the > >> > variable. > >> > All code after > >> > the closing textarea is executed in the browser. > >> > >> > Example: > >> > >> > output = This is some > >> > textThen some > >> > other stuff > >> > >> > >> > >> > name="contents'>#output# >> > > > >> > >> > .equals > >> > >> > >> > This is some text > >> > >> > Then some other stuff. Kind of a bitc
RE: Writing a file with CFFILE
I'd agree, there's probably no "perfect" solution. I just wanted to point out (what, surely, everyone already knows) that relying on JavaScript can be "dangerous." Personally, for double-quotes, I've always had great success by replacing all double-quotes with " and then reversing the replacement on the backend. I don't know that I've had to do the same for HTML content, but I would imagine that simply replacing angle brackets (or maybe even just the left angle bracket) with the appropriate entities would be sufficient. Am I overlooking something? -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 9:36 AM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > You mean enabled -- or doesn't disable js... This is true -- but it's the > only way I know of to preserve the original format of the text, including > html, and allow it to be updated after the fact. HTMLEditFormat() or any > other kind of string manipulation going into the form field will > change the > content in some way after the first edit. So there really is no perfect > solution -- either you lose the original format, or you rely on javascript > which could potentially be disabled. > > > Unless the client has JS disabled. Then this method won't > > work at all. > > > -- > > Mosh Teitelbaum > > evoch, LLC > > Tel: (301) 625-9191 > > Fax: (301) 933-3651 > > Email: [EMAIL PROTECTED] > > WWW: http://www.evoch.com/ > > > >> -----Original Message- > >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > >> Sent: Monday, November 25, 2002 11:07 PM > >> To: CF-Talk > >> Subject: RE: Writing a file with CFFILE > >> > >> > >> Not necessarily. Assuming you want to be able to enter > >> text areas and the > >> like (or any html actually) in your textarea, using > >> htmledit format will > >> allow you to enter it once -- but never update it after > >> the fact because > >> when you save it the 2nd time, it's no longer html code. > >> The email I just > >> sent off a moment ago explains a method (afaik the only > >> method) of > >> preserving the content in its original format, so it's > >> still > >> viable as html > >> even after it's been saved several times. > >> > >> > Nevermind... I'm an idiot over thinking the basics... > >> > HTMLEditFormat()..! > >> > >> > hehe, > >> > Steve > >> > >> > -Original Message- > >> > From: Steve Reich [mailto:[EMAIL PROTECTED]] > >> > Sent: Monday, November 25, 2002 9:26 PM > >> > To: CF-Talk > >> > Subject: RE: Writing a file with CFFILE > >> > >> > >> >> I'm guessing you're using MX ... Probably using > >> >> setEncoding() whether you > >> >> specify ISO latin or UTF-8 on the form scope on the > >> >> action page will > >> > resolve > >> >> the issue... I'd likely place it in the > >> >> application.cfm > >> >> and apply it to > >> > both > >> >> form and url. > >> > >> > >> > Thanks! That fixed that problem. I have another one > >> > now > >> > >> > If I call a file like this... > >> > >> > > >> > >> > . then display it like this > >> > >> > >> > name="contents">#output# >> > > > >> > >> > . I run into a problem if the variable output has a > >> > textarea tag contained > >> > within it. It sees the closing textarea tag in the > >> > output > >> > variable as the > >> > closing tag for the textarea used to display the > >> > variable. > >> > All code after > >> > the closing textarea is executed in the browser. > >> > >> > Example: > >> > >> > output = This is some > >> > textThen some > >> > other stuff > >> > >> > >> > >> > name="contents'>#output# >> > > > >> > >> > .equals > >> > >> > >> > This is some text > >> > >> > Then some ot
RE: Writing a file with CFFILE
You mean enabled -- or doesn't disable js... This is true -- but it's the only way I know of to preserve the original format of the text, including html, and allow it to be updated after the fact. HTMLEditFormat() or any other kind of string manipulation going into the form field will change the content in some way after the first edit. So there really is no perfect solution -- either you lose the original format, or you rely on javascript which could potentially be disabled. > Unless the client has JS disabled. Then this method won't > work at all. > -- > Mosh Teitelbaum > evoch, LLC > Tel: (301) 625-9191 > Fax: (301) 933-3651 > Email: [EMAIL PROTECTED] > WWW: http://www.evoch.com/ >> -Original Message- >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] >> Sent: Monday, November 25, 2002 11:07 PM >> To: CF-Talk >> Subject: RE: Writing a file with CFFILE >> >> >> Not necessarily. Assuming you want to be able to enter >> text areas and the >> like (or any html actually) in your textarea, using >> htmledit format will >> allow you to enter it once -- but never update it after >> the fact because >> when you save it the 2nd time, it's no longer html code. >> The email I just >> sent off a moment ago explains a method (afaik the only >> method) of >> preserving the content in its original format, so it's >> still >> viable as html >> even after it's been saved several times. >> >> > Nevermind... I'm an idiot over thinking the basics... >> > HTMLEditFormat()..! >> >> > hehe, >> > Steve >> >> > -Original Message- >> > From: Steve Reich [mailto:[EMAIL PROTECTED]] >> > Sent: Monday, November 25, 2002 9:26 PM >> > To: CF-Talk >> > Subject: RE: Writing a file with CFFILE >> >> >> >> I'm guessing you're using MX ... Probably using >> >> setEncoding() whether you >> >> specify ISO latin or UTF-8 on the form scope on the >> >> action page will >> > resolve >> >> the issue... I'd likely place it in the >> >> application.cfm >> >> and apply it to >> > both >> >> form and url. >> >> >> > Thanks! That fixed that problem. I have another one >> > now >> >> > If I call a file like this... >> >> > >> >> > . then display it like this >> >> > > > name="contents">#output#> > > >> >> > . I run into a problem if the variable output has a >> > textarea tag contained >> > within it. It sees the closing textarea tag in the >> > output >> > variable as the >> > closing tag for the textarea used to display the >> > variable. >> > All code after >> > the closing textarea is executed in the browser. >> >> > Example: >> >> > output = This is some >> > textThen some >> > other stuff >> >> >> > > > name="contents'>#output#> > > >> >> > .equals >> >> >> > This is some text >> >> > Then some other stuff. Kind of a bitch to explain. >> > Help! >> >> >> >> > TIA, >> > Steve >> >> >> > ~~~ >> > ~~~ >> > ~~~| >> > Archives: >> > http://www.houseoffusion.com/cf_lists/index.cfm?forumid >> > =4 >> > Subscription: >> > http://www.houseoffusion.com/cf_lists/index. >> > cfm?method=subscribe&forumid=4 >> > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq >> > This list and all House of Fusion resources hosted by >> > CFHosting.com. The place for dependable ColdFusion >> > Hosting. >> >> >> s. isaac dealey954-776-0046 >> >> new epoch http://www.turnkey.to >> >> lead architect, tapestry cms http://products.turnkey.to >> >> certified advanced coldfusion 5 developer >> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 >> >> >> > ~~ > ~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/cf_lists/index. > cfm?method=subscribe&forumid=4 > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > Signup for the Fusion Authority news alert and keep up > with the latest news in ColdFusion and related topics. > http://www.fusionauthority.com/signup.cfm s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: Writing a file with CFFILE
Unless the client has JS disabled. Then this method won't work at all. -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 25, 2002 11:07 PM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > Not necessarily. Assuming you want to be able to enter text areas and the > like (or any html actually) in your textarea, using htmledit format will > allow you to enter it once -- but never update it after the fact because > when you save it the 2nd time, it's no longer html code. The email I just > sent off a moment ago explains a method (afaik the only method) of > preserving the content in its original format, so it's still > viable as html > even after it's been saved several times. > > > Nevermind... I'm an idiot over thinking the basics... > > HTMLEditFormat()..! > > > hehe, > > Steve > > > -Original Message- > > From: Steve Reich [mailto:[EMAIL PROTECTED]] > > Sent: Monday, November 25, 2002 9:26 PM > > To: CF-Talk > > Subject: RE: Writing a file with CFFILE > > > >> I'm guessing you're using MX ... Probably using > >> setEncoding() whether you > >> specify ISO latin or UTF-8 on the form scope on the > >> action page will > > resolve > >> the issue... I'd likely place it in the application.cfm > >> and apply it to > > both > >> form and url. > > > > Thanks! That fixed that problem. I have another one > > now > > > If I call a file like this... > > > > > > . then display it like this > > > > name="contents">#output# > > > . I run into a problem if the variable output has a > > textarea tag contained > > within it. It sees the closing textarea tag in the output > > variable as the > > closing tag for the textarea used to display the variable. > > All code after > > the closing textarea is executed in the browser. > > > Example: > > > output = This is some > > textThen some > > other stuff > > > > > name="contents'>#output# > > > .equals > > > > This is some text > > > Then some other stuff. Kind of a bitch to explain. Help! > > > > > TIA, > > Steve > > > > ~~ > > ~~~| > > Archives: > > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > > Subscription: http://www.houseoffusion.com/cf_lists/index. > > cfm?method=subscribe&forumid=4 > > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > > This list and all House of Fusion resources hosted by > > CFHosting.com. The place for dependable ColdFusion > > Hosting. > > > s. isaac dealey954-776-0046 > > new epoch http://www.turnkey.to > > lead architect, tapestry cms http://products.turnkey.to > > certified advanced coldfusion 5 developer > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: Writing a file with CFFILE
Not necessarily. Assuming you want to be able to enter text areas and the like (or any html actually) in your textarea, using htmledit format will allow you to enter it once -- but never update it after the fact because when you save it the 2nd time, it's no longer html code. The email I just sent off a moment ago explains a method (afaik the only method) of preserving the content in its original format, so it's still viable as html even after it's been saved several times. > Nevermind... I'm an idiot over thinking the basics... > HTMLEditFormat()..! > hehe, > Steve > -Original Message- > From: Steve Reich [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 25, 2002 9:26 PM > To: CF-Talk > Subject: RE: Writing a file with CFFILE >> I'm guessing you're using MX ... Probably using >> setEncoding() whether you >> specify ISO latin or UTF-8 on the form scope on the >> action page will > resolve >> the issue... I'd likely place it in the application.cfm >> and apply it to > both >> form and url. > Thanks! That fixed that problem. I have another one > now > If I call a file like this... > > . then display it like this > name="contents">#output# > . I run into a problem if the variable output has a > textarea tag contained > within it. It sees the closing textarea tag in the output > variable as the > closing tag for the textarea used to display the variable. > All code after > the closing textarea is executed in the browser. > Example: > output = This is some > textThen some > other stuff > name="contents'>#output# > .equals > This is some text > Then some other stuff. Kind of a bitch to explain. Help! > TIA, > Steve > ~~ > ~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/cf_lists/index. > cfm?method=subscribe&forumid=4 > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > This list and all House of Fusion resources hosted by > CFHosting.com. The place for dependable ColdFusion > Hosting. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Writing a file with CFFILE
> Thanks! That fixed that problem. I have another one > now > If I call a file like this... > > .. then display it like this > name="contents">#output# > .. I run into a problem if the variable output has a > textarea tag contained > within it. Say no more... I had to deal with this issue with my CMS application. It's the same problem that occurs with text fields and users entering double-quotes where you've used something like To the browser (because variable output / evaluation occurs on the server), this appears as though you've simply typed in or Of course, because of the nature of html and browsers, you already know what happens: The browser see's the double-quote and ends the attribute or the and ends the textarea... The way around this is to create the form first, then populate the values _after_ the form has finished rendering, using javascript. The qForms API ( http://www.pengoworks.com ) can make this a much simpler process... For instance, function loadMyForm() { document.myform.mytemplate.value = "#jsstringformat(myvalue)#"; } Something like this works okay, but every time you add a text field or a textarea to the form, you also have to add lines of javascript. With qForms and a tiny bit of wddx it's possible to populate a 500 field form with the same half-dozen lines it takes to populate a 5 field form. I.e.: function loadMyForm() { theform = new qForm("myform");theform.setFields(formdata); } Gotta love reusable code. :) One caveat -- the call will jsstringformat everything accept an instance of ( in which case, you run into the same problem you had before with the form fields ) ... You can escape as something like <\/script> but you can't do it prior to the cfwddx call, and since the cfwddx call outputs directly to javascript, this means if you need to allow javascript blocks within your textarea, then you'll have to convert your variables to javascript manually. Which isn't too tough -- just replace the cfwddx tag with this: formdata = new Object(); formdata["#jsstringformat(x)#"] = "#ReplaceNoCase(jsstringformat(form[x]), "","<\/script>","ALL")#"; Sorry about the line breaks, you know, email and all... :) hth s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: Writing a file with CFFILE
Replace all ">" characters with ">" and all "<" characters with "<". So you'd use: ", ">", "ALL")> #output# -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: Steve Reich [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 25, 2002 9:26 PM > To: CF-Talk > Subject: RE: Writing a file with CFFILE > > > > I'm guessing you're using MX ... Probably using setEncoding() > whether you > > specify ISO latin or UTF-8 on the form scope on the action page will > resolve > > the issue... I'd likely place it in the application.cfm and apply it to > both > > form and url. > > > Thanks! That fixed that problem. I have another one now > > If I call a file like this... > > > > .. then display it like this > > #output# > > .. I run into a problem if the variable output has a textarea tag > contained > within it. It sees the closing textarea tag in the output variable as the > closing tag for the textarea used to display the variable. All code after > the closing textarea is executed in the browser. > > Example: > > output = This is some textThen some > other stuff > > > Then some other stuff > > I get a textarea with this: > This is some text > > .Then some other stuff. Kind of a bitch to explain. Help! > > > TIA, > Steve > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: Writing a file with CFFILE
Nevermind... I'm an idiot over thinking the basics... HTMLEditFormat()..! hehe, Steve -Original Message- From: Steve Reich [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 9:26 PM To: CF-Talk Subject: RE: Writing a file with CFFILE > I'm guessing you're using MX ... Probably using setEncoding() whether you > specify ISO latin or UTF-8 on the form scope on the action page will resolve > the issue... I'd likely place it in the application.cfm and apply it to both > form and url. Thanks! That fixed that problem. I have another one now If I call a file like this... . then display it like this #output# . I run into a problem if the variable output has a textarea tag contained within it. It sees the closing textarea tag in the output variable as the closing tag for the textarea used to display the variable. All code after the closing textarea is executed in the browser. Example: output = This is some textThen some other stuff Then some other stuff I get a textarea with this: This is some text Then some other stuff. Kind of a bitch to explain. Help! TIA, Steve ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Writing a file with CFFILE
> I'm guessing you're using MX ... Probably using setEncoding() whether you > specify ISO latin or UTF-8 on the form scope on the action page will resolve > the issue... I'd likely place it in the application.cfm and apply it to both > form and url. Thanks! That fixed that problem. I have another one now If I call a file like this... .. then display it like this #output# .. I run into a problem if the variable output has a textarea tag contained within it. It sees the closing textarea tag in the output variable as the closing tag for the textarea used to display the variable. All code after the closing textarea is executed in the browser. Example: output = This is some textThen some other stuff Then some other stuff I get a textarea with this: This is some text .Then some other stuff. Kind of a bitch to explain. Help! TIA, Steve ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: Writing a file with CFFILE
> I have a code editor I've written that uses cffile to grab > a cf page and put > it in a textarea. Then I can edit my cf code and save it > by writing back to > the file using cffile. Everything seems to work fine > except with the > non-braking spaces character ( ). It replaces all > with a  > (alt+0194) character. Can someone shed some light on this > problem and a > solution? I'm guessing you're using MX ... Probably using setEncoding() whether you specify ISO latin or UTF-8 on the form scope on the action page will resolve the issue... I'd likely place it in the application.cfm and apply it to both form and url. s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm