Skip to content
Snippets Groups Projects
  • Arseny Kapoulkine's avatar
    aac75cd2
    Escape TAB character in attribute values with 	 · aac75cd2
    Arseny Kapoulkine authored
    This change modifies the table entries for ctx_special_attr to treat TAB
    character as special, which makes the output code escape it.
    
    Before this change, trying to use TAB in an attribute value would output
    it verbatim; during subsequent parsing, pugixml - and other compliant
    parsers - would apply attribute-value normalization, turning the TAB
    into a space and losing the original value.
    
    Using 	 fixes this; if an input document has 	 in an attribute
    value, that gets unescaped into \t during parsing and escaped back into
    	 during output, which means we can now roundtrip values like this.
    
    Fixes #242.
    aac75cd2
    History
    Escape TAB character in attribute values with 	
    Arseny Kapoulkine authored
    This change modifies the table entries for ctx_special_attr to treat TAB
    character as special, which makes the output code escape it.
    
    Before this change, trying to use TAB in an attribute value would output
    it verbatim; during subsequent parsing, pugixml - and other compliant
    parsers - would apply attribute-value normalization, turning the TAB
    into a space and losing the original value.
    
    Using 	 fixes this; if an input document has 	 in an attribute
    value, that gets unescaped into \t during parsing and escaped back into
    	 during output, which means we can now roundtrip values like this.
    
    Fixes #242.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.