Commit 9330f4fe805b3bc784fe0d4187fa0408c4836abc
1 parent
d5ec362d6f
Exists in
master
perbaikan sn dengan spasi
Showing 1 changed file with 8 additions and 1 deletions Side-by-side Diff
xmlout.js
... | ... | @@ -174,13 +174,20 @@ function prefixMessageWithSN(data) { |
174 | 174 | return data['MESSAGE']; |
175 | 175 | } |
176 | 176 | |
177 | + sn = ''; | |
178 | + | |
177 | 179 | if (data['MESSAGE'].search(/^SN=.+;/) == -1) { |
178 | 180 | if (data['SN'] && data['SN'].trim()) { |
181 | + sn = data['SN'].trim(); | |
179 | 182 | return 'SN=' + data['SN'].trim() + '; ' + data['MESSAGE']; |
180 | 183 | } |
181 | 184 | else if (config.h2h_out.parse_sn == 'YES') { |
182 | - return 'SN=' + parseSN(data['MESSAGE']) + '; ' + data['MESSAGE']; | |
185 | + sn = parseSN(data['MESSAGE']); | |
183 | 186 | } |
187 | + | |
188 | + sn = sn.replace(/ /g, '-'); | |
189 | + | |
190 | + return 'SN=' + sn + '; ' + data['MESSAGE']; | |
184 | 191 | } |
185 | 192 | |
186 | 193 | return data['MESSAGE']; |