Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
quote text so that parsing will regenerate t

        def quoteText(t):
    "quote text so that parsing will regenerate t"
    t = t.replace("$", "$$")
    t = t.replace("{{", "{${")
    t = t.replace("}}", "}$}")
    return t

src/w/h/whiff-1.1/whiff/middleware/setTarget.py   whiff(Download)
                callbackJavascript = "".join(list(callbackJavascriptSeq))
                # need to quote callback javascript so it will pass through the first template evaluation
                callbackJavascript = parseTemplate.quoteText(callbackJavascript)
                #pr "setTarget callback for", repr(cbname)
                #pr "yeilding"
            page = self.param_value(app,env)
            # need to quote page so it survives the first round trip
            page = parseTemplate.quoteText(page)
            # otherwise just expand the the javascript template