18 Aug
2001
18 Aug
'01
8:10 p.m.
Loren Stafford writes:
I find myself stuffing arbitrary strings into javascript pop-up displays, but those strings often contain characters (e.g. quotes) that break the genearated javascript syntax. I know there is no javascript_quote argument for dtml-var, and I probably have to filter the string with an external method.
Does anyone have such an external method already in use that you could share with the list? Quoting rules in Python and Javascript are identical. This means "repr" has a good chance to do what you want.
Dieter