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 Center175 J. Llorente Street +63 (32) 255-6921Cebu City, Cebu 6000 kengrome@webdna.netPhilippines 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:
|
- 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 Center175 J. Llorente Street +63 (32) 255-6921Cebu City, Cebu 6000 kengrome@webdna.netPhilippines 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:
Problem (1997)
WebCat2b13MacPlugin - nested [xxx] contexts (1997)
ListFiles bug v3.0 OSX (2000)
webcat running as www, should that be webstar for use with (2002)
WebCat2b12plugin - [search] is broken ... not! (1997)
OT: Unix Geek Needed (2005)
Resume Catalog ? (1997)
Format of Required fields error message (1997)
ShowCart (2001)
Quitting WebMerchant ? (1997)
[date] problem with %d%m%Y (1998)
Help name our technology! (1997)
Search (1997)
Nested tags count question (1997)
Another New Site (1998)
two of the same named db's open at once (1998)
WebCatalog.acgi quitting with error Type 2 (1998)
New public beta available (1997)
AAgghh!! Help, please. SSL strikes again. (1997)
WebCatalog 4.0.2b5 available (2000)