[svn-commits] wdoekes: branch 10 r344836 - in /branches/10: ./ main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Nov 11 15:29:09 CST 2011


Author: wdoekes
Date: Fri Nov 11 15:29:05 2011
New Revision: 344836

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344836
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
........

Merged revisions 344835 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/main/manager.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/manager.c?view=diff&rev=344836&r1=344835&r2=344836
==============================================================================
--- branches/10/main/manager.c (original)
+++ branches/10/main/manager.c Fri Nov 11 15:29:05 2011
@@ -5745,9 +5745,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;
 		}
 
@@ -5783,7 +5784,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 svn-commits mailing list