@@ -1081,16 +1081,11 @@ export class AwsSes implements INodeType {
1081
1081
1082
1082
if ( operation === 'sendTemplate' ) {
1083
1083
const toAddresses = this . getNodeParameter ( 'toAddresses' , i ) as string [ ] ;
1084
-
1085
1084
const template = this . getNodeParameter ( 'templateName' , i ) as string ;
1086
-
1087
1085
const fromEmail = this . getNodeParameter ( 'fromEmail' , i ) as string ;
1088
-
1089
1086
const additionalFields = this . getNodeParameter ( 'additionalFields' , i ) ;
1090
-
1091
1087
const templateDataUi = this . getNodeParameter ( 'templateDataUi' , i ) as IDataObject ;
1092
-
1093
- const params = [ `Template=${ template } ` , `Source=${ fromEmail } ` ] ;
1088
+ const params = [ `Template=${ template } ` , `Source=${ encodeURIComponent ( fromEmail ) } ` ] ;
1094
1089
1095
1090
if ( toAddresses . length ) {
1096
1091
setParameter ( params , 'Destination.ToAddresses.member' , toAddresses ) ;
@@ -1150,7 +1145,7 @@ export class AwsSes implements INodeType {
1150
1145
//@ts -ignore
1151
1146
templateData [ templateDataValue . key ] = templateDataValue . value ;
1152
1147
}
1153
- params . push ( `TemplateData=${ JSON . stringify ( templateData ) } ` ) ;
1148
+ params . push ( `TemplateData=${ encodeURIComponent ( JSON . stringify ( templateData ) ) } ` ) ;
1154
1149
}
1155
1150
}
1156
1151
@@ -1176,13 +1171,15 @@ export class AwsSes implements INodeType {
1176
1171
const additionalFields = this . getNodeParameter ( 'additionalFields' , i ) ;
1177
1172
1178
1173
const params = [
1179
- `Template.TemplateName=${ templateName } ` ,
1180
- `Template.SubjectPart=${ subjectPart } ` ,
1181
- `Template.HtmlPart=<h1> ${ htmlPart } </h1> ` ,
1174
+ `Template.TemplateName=${ encodeURIComponent ( templateName ) } ` ,
1175
+ `Template.SubjectPart=${ encodeURIComponent ( subjectPart ) } ` ,
1176
+ `Template.HtmlPart=${ encodeURIComponent ( htmlPart ) } ` ,
1182
1177
] ;
1183
1178
1184
1179
if ( additionalFields . textPart ) {
1185
- params . push ( `Template.TextPart=${ additionalFields . textPart } ` ) ;
1180
+ params . push (
1181
+ `Template.TextPart=${ encodeURIComponent ( additionalFields . textPart as string ) } ` ,
1182
+ ) ;
1186
1183
}
1187
1184
1188
1185
responseData = await awsApiRequestSOAP . call (
@@ -1256,18 +1253,24 @@ export class AwsSes implements INodeType {
1256
1253
1257
1254
const updateFields = this . getNodeParameter ( 'updateFields' , i ) ;
1258
1255
1259
- const params = [ `Template.TemplateName=${ templateName } ` ] ;
1256
+ const params = [ `Template.TemplateName=${ encodeURIComponent ( templateName ) } ` ] ;
1260
1257
1261
1258
if ( updateFields . textPart ) {
1262
- params . push ( `Template.TextPart=${ updateFields . textPart } ` ) ;
1259
+ params . push (
1260
+ `Template.TextPart=${ encodeURIComponent ( updateFields . textPart as string ) } ` ,
1261
+ ) ;
1263
1262
}
1264
1263
1265
1264
if ( updateFields . subjectPart ) {
1266
- params . push ( `Template.SubjectPart=${ updateFields . subjectPart } ` ) ;
1265
+ params . push (
1266
+ `Template.SubjectPart=${ encodeURIComponent ( updateFields . subjectPart as string ) } ` ,
1267
+ ) ;
1267
1268
}
1268
1269
1269
1270
if ( updateFields . subjectPart ) {
1270
- params . push ( `Template.HtmlPart=${ updateFields . htmlPart } ` ) ;
1271
+ params . push (
1272
+ `Template.HtmlPart=${ encodeURIComponent ( updateFields . htmlPart as string ) } ` ,
1273
+ ) ;
1271
1274
}
1272
1275
1273
1276
responseData = await awsApiRequestSOAP . call (
0 commit comments