Index: gw/smsbox.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsbox.c,v
retrieving revision 1.284
diff -a -u -r1.284 smsbox.c
--- gw/smsbox.c	6 Dec 2009 17:24:14 -0000	1.284
+++ gw/smsbox.c	27 Feb 2010 11:43:54 -0000
@@ -805,8 +805,16 @@
 		*dlr_mask = tmplong;
 	    O_DESTROY(tmp2);
 	}
-	get_tag(tmp, octstr_imm("dlr-url"), dlr_url, 0, 0);
-	O_DESTROY(tmp);
+   if (get_tag(tmp, octstr_imm("dlr-url"), dlr_url, 0, 0) > 0)
+   {
+      Octstr *token = octstr_create("&amp;");
+      Octstr *repl = octstr_create("&");
+
+      octstr_replace(*dlr_url, token, repl);
+      octstr_destroy(token);
+      octstr_destroy(repl);
+   }
+   O_DESTROY(tmp);
     }
 
     /* validity (vp/delay) */
