import html


def clean_sgml(df):
    """
    Cleans markup that could be unsafe in sgml
    """
    for field in ['title', 'body']:
        df[field] = df[field].apply(lambda x:html.escape(x, quote=False))
    return df