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:

insecure client not shown (1998) using showpage and showcart commands (1996) Server slowing down. (1997) need some help with a loop (1999) emailer error -108 (1997) Great product and great job ! (1997) Preventing Merchant Settling ? (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Retrospect Backup Misses Empty Folders (2000) shipping costs (1998) Associative lookup style? (1997) WebCatalog/WebMerchant 2.1 (1998) writing orders to a db (1997) WebCat consulting $ (1998) Webstar 1.3.1 PPC (1997) Need relative path explanation (1997) when is date system date or order date? (1997) Location of Browser Info.txt file (1997) [WebDNA] anyone know why webdna kicking out incorrect dates? (2008) Credit Card not accepted (1998)