[asterisk-commits] wdoekes: branch 1.8 r344835 - /branches/1.8/main/manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Nov 11 15:22:03 CST 2011
Author: wdoekes
Date: Fri Nov 11 15:21:58 2011
New Revision: 344835
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344835
Log:
Fix bad quoting of multiline mxml opaque_data that caused invalid xml.
The opaque_data was added and enclosed in single quotes, assuming it
would be only a single line. The rest of the lines were appended after
the closing quote.
(closes issue ASTERISK-18852)
Reported by: peep_ on IRC
Review: https://reviewboard.asterisk.org/r/1577
Modified:
branches/1.8/main/manager.c
Modified: branches/1.8/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/manager.c?view=diff&rev=344835&r1=344834&r2=344835
==============================================================================
--- branches/1.8/main/manager.c (original)
+++ branches/1.8/main/manager.c Fri Nov 11 15:21:58 2011
@@ -5600,9 +5600,10 @@
}
if (in_data) {
- /* Process data field in Opaque mode */
+ /* Process data field in Opaque mode. This is a
+ * followup, so we re-add line feeds. */
+ ast_str_append(out, 0, xml ? "\n" : "<br>\n");
xml_copy_escape(out, val, 0); /* data field */
- ast_str_append(out, 0, xml ? "\n" : "<br>\n");
continue;
}
@@ -5638,7 +5639,9 @@
ao2_ref(vc, -1);
ast_str_append(out, 0, xml ? "='" : "</td><td>");
xml_copy_escape(out, val, 0); /* data field */
- ast_str_append(out, 0, xml ? "'" : "</td></tr>\n");
+ if (!in_data || !*in) {
+ ast_str_append(out, 0, xml ? "'" : "</td></tr>\n");
+ }
}
if (inobj) {
More information about the asterisk-commits
mailing list