Did I find the right examples for you? yes no

All Samples(9)  |  Call(8)  |  Derive(0)  |  Import(1)
convert quoted html text into unquoted html text

        def unquote(result, unquotePairs=unquotePairs):
    "convert quoted html text into unquoted html text"
    # this is not an efficient algorithm for very large strings with lots of quoted values.
    sresult = result.split("&")
    lresult = [sresult[0]]
    for fragment in sresult[1:]:
        #pr "processing", fragment
        replaced = ""
        kept = fragment
        fixed = "&"
        for (quoted, unquoted) in unquotePairs:
            lq = len(quoted)
            prefix = fragment[:lq].lower()
            if prefix==quoted:
                fixed = unquoted
                kept = fragment[lq:]
                #pr "matched", (fixed, kept)
                break
        #pr "appending", (fixed,kept)
        if fixed:
            lresult.append(fixed)
        if kept:
            lresult.append(kept)
    result = "".join(lresult)
    #pr "unquote Html returning", [result]
    return result
        


src/w/h/whiff-1.1/whiff/middleware/urlToPage.py   whiff(Download)
        qjheaders = whiffenv.cgiGet(env, "headers")
        qstatus = whiffenv.cgiGet(env, "status")
        content = resolver.unquote(qcontent)
        status = str(resolver.unquote(qstatus))
        jheaders = resolver.unquote(qjheaders)

src/w/h/whiff-1.1/whiff/middleware/getPage.py   whiff(Download)
        if urls and len(urls)==1:
            relativeUrl = urls[0]
        templateText = resolver.unquote(templateText)
        if VERBOSE:
            print "verbose: GOT RELATIVE URL", relativeUrl

src/w/h/whiff-1.1/whiff/middleware/png/pieChart.py   whiff(Download)
    def __call__(self, env, start_response):
        env = resolver.process_cgi(env, parse_cgi=True)
        cgi_parameters = env[whiffenv.CGI_DICTIONARY]
        labelsAndData = cgi_parameters["labelsAndData"][0]
        labelsAndData = resolver.unquote(labelsAndData)

src/w/h/whiff-1.1/whiff/middleware/png/barChart.py   whiff(Download)
        cgi_parameters = env[whiffenv.CGI_DICTIONARY]
        labelsAndData = cgi_parameters["labelsAndData"][0]
        labelsAndData = resolver.unquote(labelsAndData)
        self.labelsAndData = self.param_json(labelsAndData,env)
        axisDelta = cgi_parameters["axisDelta"][0]

src/w/h/whiff-1.1/whiff/middleware/unquoteHtml.py   whiff(Download)
 
"""
from whiff.resolver import unquote
from whiff.middleware import misc
 
    def __call__(self, env, start_response):
        page = self.page
        result = self.param_value(self.page, env, start_response)
        result = unquote(result)
        return [result]

src/w/h/whiff-1.1/whiff/middleware/pygmentsColorize.py   whiff(Download)
        formatter = HtmlFormatter(linenos=False, cssclass=cssClassName)
        if unquoteIt:
            code = resolver.unquote(code)
        payload = highlight(code, lexer, formatter)
        start_response("200 OK", [('Content-Type', 'text/css')])