Beispiel #1
0
def quotefordtd(source):
    if '"' in source:
        if "'" in source:
            return "'" + source.replace("'", ''') + "'"
        else:
            return quote.singlequotestr(source)
    else:
        return quote.quotestr(source)
Beispiel #2
0
def quotefordtd(source):
    if '"' in source:
        if "'" in source:
            return "'" + source.replace("'", ''') + "'"
        else:
            return quote.singlequotestr(source)
    else:
        return quote.quotestr(source)
Beispiel #3
0
def quotefordtd(source):
    if '%' in source:
        source = source.replace("%", "%")
    if '"' in source:
        if "'" in source:
            value = "'" + source.replace("'", ''') + "'"
        else:
            value = quote.singlequotestr(source)
    else:
        value = quote.quotestr(source)
    return value.encode('utf-8')
Beispiel #4
0
def quotefordtd(source):
    if "%" in source:
        source = source.replace("%", "%")
    if '"' in source:
        if "'" in source:
            value = "'" + source.replace("'", "'") + "'"
        else:
            value = quote.singlequotestr(source)
    else:
        value = quote.quotestr(source)
    return value.encode("utf-8")