alek-sys / sublimetext_indentxml

Plugin for Sublime Text editor for reindenting XML and JSON files
MIT License
534 stars 135 forks source link

Convert characters '&', '<' and '>' to entities and back when removing and reinserting the CDATA elements. #30

Open sligodave opened 11 years ago

sligodave commented 11 years ago

If the string between the CDATA elements contain entities, the indent will fail as they don't currently get converted to xml entities. This commit will create entities where needed and also remove them again when the CDATA elements are reinserted after the indent.