Next / Previous / Contents / Shipman's homepage

7.4. ESCAPE_MAP

This dictionary's keys are the characters that are not allowed within XML attribute values. Characters “<” and “&” are explicitly forbidden by the XML standard. We also escape the double-quote character “"” because it is used to delimit the entire attribute value.

sox.py
ESCAPE_MAP = {
    u'<': u'&lt;',
    u'&': u'&amp;',
    u'"': u'&quot;' }