Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)
quote string for embedding in html

        def quote(result, quotePairs=quotePairs):
    "quote string for embedding in html"
    #pr "quoting", repr(result)
    result = stream.myunicode(result)
    for (quoted, unquoted) in quotePairs:
        result = result.replace(unquoted, quoted)
    #pr "quoted result", repr(result)
    #result = stream.mystr(result)
    return result

src/w/h/whiff-1.1/whiff/middleware/debugDump.py   whiff(Download)
            cgi = resolver.process_cgi(env, parse_cgi=True)
        json_env = jsonParse.format(env)
        quoted_json = resolver.quote(json_env)
        start_response("200 OK", [('Content-Type', content_type)])
        return [quoted_json]

src/w/h/whiff-1.1/whiff/middleware/quoteHtml.py   whiff(Download)
# import must be absolute
from whiff.middleware import misc
from whiff.resolver import quote
#quotePairs = [("&lt;", "<"), ("&amp;", "&"), ("&gt;", ">")]
    def __call__(self, env, start_response):
        # allow the page to start the response
        page = self.param_value(self.page, env, start_response)
        return [ quote(page) ]

src/w/h/whiff-1.1/whiff/middleware/EvalPageFunction.py   whiff(Download)
            # inline call suitable for embedding directly in html tag
            javaScriptText = CALL_TEMPLATE % D
            javaScriptText = resolver.quote(javaScriptText)
            javaScriptText = JAVASCRIPTTEMPLATE % D

src/w/h/whiff-1.1/whiff/middleware/base64DataUrl.py   whiff(Download)
from whiff.middleware import misc
#import misc
from whiff.resolver import quote
import base64
from whiff import stream