def HTML_encode_django_chars(string):
    """replace curly braces and percent signs by their html encoded equivalents
    """
    string = string.replace("{", "&#123;")
    string = string.replace("}", "&#125;")
    string = string.replace("%", "&#37;")
    return string