Skip to content

Commit

Permalink
MAGETWO-82998: [2.3-develop] X-Magento-Tags header containing whitesp…
Browse files Browse the repository at this point in the history
…aces causes exception #11849
  • Loading branch information
ishakhsuvarov authored Nov 2, 2017
2 parents 72ebf04 + d5c5ae2 commit 759fdf1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ public function convert(\DOMNode $source, $basePath = '')
}
} else {
if ($result) {
$result['value'] = $value;
$result['value'] = trim($value);
} else {
$result = $value;
$result = trim($value);
}
}
return $result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
return [
'root' => [
'node_one' => [
Expand All @@ -11,14 +12,20 @@
'subnode' => [
['attributeThree' => '30'],
['attributeThree' => '40', 'attributeFour' => '40', 'value' => 'Value1'],
['attributeThree' => '50', 'value' => 'value_from_new_line'],
['attributeThree' => '60', 'value' => 'auto_formatted_by_ide_value_due_to_line_size_restriction']
],
'books' => ['attributeFive' => '50'],
],
'multipleNode' => [
'one' => ['id' => 'one', 'name' => 'name1', 'value' => '1'],
'two' => ['id' => 'two', 'name' => 'name2', 'value' => '2'],
'three' => ['id' => 'three', 'name' => 'name3', 'value' => 'value_from_new_line'],
'four' => ['id' => 'four', 'name' => 'name4', 'value' => 'auto_formatted_by_ide_value_due_to_line_size_restriction'],
],
'someOtherVal' => '',
'someDataVal' => '',
'valueFromNewLine' => 'value_from_new_line',
'autoFormattedValue' => 'auto_formatted_by_ide_value_due_to_line_size_restriction'
]
];
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
<node_one attributeOne = '10' attributeTwo = '20'>
<subnode attributeThree = '30'></subnode>
<subnode attributeThree = '40' attributeFour = '40' >Value1</subnode>
<subnode attributeThree = '50'>
value_from_new_line
</subnode>
<subnode attributeThree = '60'>auto_formatted_by_ide_value_due_to_line_size_restriction
</subnode>
<books attributeFive = '50' />
</node_one>
<multipleNode id="one" name="name1">
Expand All @@ -19,4 +24,18 @@
</multipleNode>
<someOtherVal></someOtherVal>
<someDataVal><![CDATA[]]></someDataVal>
<multipleNode id="three" name="name3">
<value>
value_from_new_line
</value>
</multipleNode>
<multipleNode id="four" name="name4">
<value>auto_formatted_by_ide_value_due_to_line_size_restriction
</value>
</multipleNode>
<valueFromNewLine>
value_from_new_line
</valueFromNewLine>
<autoFormattedValue>auto_formatted_by_ide_value_due_to_line_size_restriction
</autoFormattedValue>
</root>

0 comments on commit 759fdf1

Please sign in to comment.