Skip to content

Commit 28336f5

Browse files
authored
fix(clients): only trim xml tag values which contain newline (#2653)
1 parent 16241cf commit 28336f5

File tree

27 files changed

+29
-32
lines changed

27 files changed

+29
-32
lines changed

clients/client-auto-scaling/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10008,7 +10008,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
1000810008
ignoreAttributes: false,
1000910009
parseNodeValue: false,
1001010010
trimValues: false,
10011-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
10011+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
1001210012
});
1001310013
const textNodeName = "#text";
1001410014
const key = Object.keys(parsedObj)[0];

clients/client-cloudformation/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11149,7 +11149,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
1114911149
ignoreAttributes: false,
1115011150
parseNodeValue: false,
1115111151
trimValues: false,
11152-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
11152+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
1115311153
});
1115411154
const textNodeName = "#text";
1115511155
const key = Object.keys(parsedObj)[0];

clients/client-cloudfront/protocols/Aws_restXml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19025,7 +19025,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
1902519025
ignoreAttributes: false,
1902619026
parseNodeValue: false,
1902719027
trimValues: false,
19028-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
19028+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
1902919029
});
1903019030
const textNodeName = "#text";
1903119031
const key = Object.keys(parsedObj)[0];

clients/client-cloudsearch/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4921,7 +4921,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
49214921
ignoreAttributes: false,
49224922
parseNodeValue: false,
49234923
trimValues: false,
4924-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
4924+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
49254925
});
49264926
const textNodeName = "#text";
49274927
const key = Object.keys(parsedObj)[0];

clients/client-cloudwatch/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6370,7 +6370,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
63706370
ignoreAttributes: false,
63716371
parseNodeValue: false,
63726372
trimValues: false,
6373-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
6373+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
63746374
});
63756375
const textNodeName = "#text";
63766376
const key = Object.keys(parsedObj)[0];

clients/client-docdb/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10727,7 +10727,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
1072710727
ignoreAttributes: false,
1072810728
parseNodeValue: false,
1072910729
trimValues: false,
10730-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
10730+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
1073110731
});
1073210732
const textNodeName = "#text";
1073310733
const key = Object.keys(parsedObj)[0];

clients/client-ec2/protocols/Aws_ec2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74754,7 +74754,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
7475474754
ignoreAttributes: false,
7475574755
parseNodeValue: false,
7475674756
trimValues: false,
74757-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
74757+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
7475874758
});
7475974759
const textNodeName = "#text";
7476074760
const key = Object.keys(parsedObj)[0];

clients/client-elastic-beanstalk/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8205,7 +8205,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
82058205
ignoreAttributes: false,
82068206
parseNodeValue: false,
82078207
trimValues: false,
8208-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
8208+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
82098209
});
82108210
const textNodeName = "#text";
82118211
const key = Object.keys(parsedObj)[0];

clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7863,7 +7863,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
78637863
ignoreAttributes: false,
78647864
parseNodeValue: false,
78657865
trimValues: false,
7866-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
7866+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
78677867
});
78687868
const textNodeName = "#text";
78697869
const key = Object.keys(parsedObj)[0];

clients/client-elastic-load-balancing/protocols/Aws_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5410,7 +5410,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
54105410
ignoreAttributes: false,
54115411
parseNodeValue: false,
54125412
trimValues: false,
5413-
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeHTML(val)),
5413+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
54145414
});
54155415
const textNodeName = "#text";
54165416
const key = Object.keys(parsedObj)[0];

0 commit comments

Comments
 (0)