json encoding double escaping newlines

Version 1.55


The DA json encoder was encoding newline characters as: \\n when it should have been encoded as: \n The ability to control which encoding is used is now optional, and can be controlled in the file: /usr/local/directadmin/data/skins/SKINNAME/skin.conf with: jsonformat=legacy or jsonformat=current If the setting is absent, it will default to "legacy", double encoding \\n This also applies to line feed: \\r vs \r The other escaped values were already correct: \t \" \\ Both the enhanced and evolution skins that are included with this release, pre-release, or downloaded will contain: jsonformat=current But the internal default to legacy is to still support old Evolution skins that rely on the double encoding. Token: SKIN_JSONFORMAT=legacy|current but only if the setting it present in the skin.conf. If not, it won't be set, and you can assume SKIN_JSONFORMAT=legacy is in use.

Interested to try DirectAdmin? Get a 30-day Free Trial!