only escape forward slashes when encode_html_chars=True

thank you ktkonrad