import re


def _escape(line):
    """
    Escape the syntax-breaking characters.
    """
    line = line.replace('[', r'\[').replace(']', r'\]')
    line = re.sub('\'', '', line)  # ' is unescapable afaik
    return line