Double-escape for double quote characters?

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 46947
interpreted = N
texte = I'm trying to create escape characters for javascript, so I place a bunch of text inside a convertchars context that uses this db:from to %08 \b %09 \t %0A \n %0C \f %0D \r \ ' \' \ \\Everything looks like it should EXCEPT FOR the double-quote () which should be replaced by (\) but is not. Instead, the backslash simply does not appear in the HTML. Only the double quote character appears, which means it has not been replaced.So it appears that the convertchars context is not working properly in this case.But I managed to make it work by double-escaping the double quote character. In other words, I put TWO backslashes in front of the double quote character, and then the resulting HTML ends up with a SINGLE backslash before the double quote character.Why is this necessary? And why only with the double quote character? Sincerely, Kenneth Grome--------------------------------------------------- WebDNA Professional Training and Development Center 175 J. Llorente Street +63 (32) 255-6921 Cebu City, Cebu 6000 kengrome@webdna.net Philippines http://www.webdna.net ---------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Double-escape for double quote characters? (Kenneth Grome 2003)
I'm trying to create escape characters for javascript, so I place a bunch of text inside a convertchars context that uses this db:from to %08 \b %09 \t %0A \n %0C \f %0D \r \ ' \' \ \\Everything looks like it should EXCEPT FOR the double-quote () which should be replaced by (\) but is not. Instead, the backslash simply does not appear in the HTML. Only the double quote character appears, which means it has not been replaced.So it appears that the convertchars context is not working properly in this case.But I managed to make it work by double-escaping the double quote character. In other words, I put TWO backslashes in front of the double quote character, and then the resulting HTML ends up with a SINGLE backslash before the double quote character.Why is this necessary? And why only with the double quote character? Sincerely, Kenneth Grome--------------------------------------------------- WebDNA Professional Training and Development Center 175 J. Llorente Street +63 (32) 255-6921 Cebu City, Cebu 6000 kengrome@webdna.net Philippines http://www.webdna.net ---------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Dubble Sku's in a Database (1999) SV: WebCatalog on Windows 98 (2000) email (1998) Progress !! WAS: Trouble with formula.db (1997) Removing and Reinstalling Typhoon (2000) Cold Fusion Buster (1997) [OT] HTML EMAIL program wanted (1999) NT Setup (1998) Replacefounditems (2003) Am on the list? (1997) WebCat2b15MacPlugin - showing [math] (1997) question: search return in order (1997) Document Contains No Data (1998) too many nested tags ... (1997) RE: Database Structure? (1998) RequiredFields template (1997) [WebDNA] Dynamic vertical columns (2008) Realtor Search (2000) searches with dash, period etc. (2000) [WebDNA] WebDNA Health Monitor (2014)