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:

page chokes on hideif when false and ignored (1998) WebCat2: Items xx to xx shown, etc. (1997) [WebDNA] SCOPE:, ---- was:--- Date: header on emails - timezone problem perhaps (emai) hmmm (2006) Include a big block of text (1997) Templates for Customer Database? (1997) [carts] and databases (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) using showpage and showcart commands (1996) using showpage and showcart commands (1996) More than one db with the same namn (was: WC2f3) (1997) Shopping Cart Problem (1998) WYSIWYG HTML editor for use in browser (2001) PSC recommends what date format yr 2000??? (1997) problems with 2 tags (1997) Possible Bug in 2.0b15.acgi (1997) upgrading (1997) Questions To Answer (1997) Roundup function? (1997) Cookie woes with Mac IE4 (1998)