asterisk/pbx
George Joseph d5de94201e config: Make text_file_save and 'dialplan save' escape semicolons in values.
When a config file is read, an unescaped semicolon signals comments which are
stripped from the value before it's stored.  Escaped semicolons are then
unescaped and become part of the value.  Both of these behaviors are normal
and expected.  When the config is serialized either by 'dialplan save' or
AMI/UpdateConfig however, the now unescaped semicolons are written as-is.
If you actually reload the file just saved, the unescaped semicolons are
now treated as start of comments.

Since true comments are stripped on read, any semicolons in
ast_variable.value must have been escaped originally.  This patch
re-escapes semicolons in ast_variable.values before they're written to
file either by 'dialplan save' or config/ast_config_text_file_save which
is called by AMI/UpdateConfig. I also fixed a few pre-existing formatting
issues nearby in pbx_config.c

Tested-by: George Joseph
ASTERISK-20127 #close

Review: https://reviewboard.asterisk.org/r/4132/
........

Merged revisions 427275 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 427276 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-05 00:17:10 +00:00
..
ael/ael-test Merged revisions 299449 via svnmerge from 2010-12-22 20:10:34 +00:00
Makefile pbx/Makefile: Revert r423237 2014-09-16 22:46:29 +00:00
dundi-parser.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
dundi-parser.h Remove built-in AES code and use optional_api instead 2010-07-21 19:11:32 +00:00
pbx_ael.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
pbx_config.c config: Make text_file_save and 'dialplan save' escape semicolons in values. 2014-11-05 00:17:10 +00:00
pbx_dundi.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
pbx_loopback.c Check result of ast_var_assign() calls for memory allocation failure. 2013-08-06 08:36:15 +00:00
pbx_lua.c pbx_lua: fix regression with global sym export and context clash by pbx_config. 2014-08-06 16:12:26 +00:00
pbx_realtime.c manager/config: Support templates and non-unique category names via AMI 2014-10-13 16:12:17 +00:00
pbx_spool.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00