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:

RE: [WebDNA] Google Cloud (2014) searchable list archive (1997) SendTo more emails (1998) PCS Frames-Default page is solution! (1997) E-mail problem... (1999) keep W* in front applescript? (1998) denied access (1997) Photo Album (2000) UPS charges (2000) Webcat interfering with Webstar? (1998) Emailer again & again (1997) totals (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Online reference (1997) ampersand XHTML in search (2006) show all problem (1997) Page Breaks in Word (2003) Auth.net and SIM (2003) Bad creator codes which cause access denied errormessage (1997) Stumpted Again (1997)