def escapeCharsForCDATA(obj):
    """Escape [,],>, and < for CDATA section.  Needed since some browsers (Firefox)
    crap out on them."""
    return obj.replace('>', '&#62;').replace('<', '&#60;').replace('[', '&#91;').replace(']', '&#93;')