Using shellquote() to escape the output from template() of an XML file containing both single quotes and exclamation marks results in exclamation marks being improperly escaped (removing all single quotes results in correct escaping).
Using shellquote() to escape the output from template() of an XML a file containing both single quotes and exclamation marks results in exclamation marks being improperly escaped (removing all single quotes results in correct escaping).
Using shellquote() to escape the output from template() of a file containing both single quotes and exclamation marks results in exclamation marks being improperly escaped (removing all single quotes results in correct escaping).
Example using small sample xml file: {code:shell} irb(main):011051:0> print scope.function_shellquote( \ ["!scope.function_template(['"test.xml'])]) "<?xml version=>\ "1.0\"?> <\\!'--\"License\"); --> <description> Using 'local.realm' to be </description> "=> nil
bash-3.2$ echo "<?xml version=\"1.0\"?> > <\!'--\"License\"); --> > <description> Using 'local.realm' to be </description> >" <?xml version="1.0"?> <\!'--"License"); --> <description> Using 'local.realm' to be </description>
Using shellquote() to escape the output from template() of a file containing both single quotes and exclamation marks results in exclamation marks being improperly escaped (removing all single quotes results in correct escaping).
<description> Using 'local.realm' to be </description> "=> nil
bash-3.2$ echo "<?xml version=\"1.0\"?>
> <\!-- \"License\"); -->
> <description> Using 'local.realm' to be </description> > " <?xml version="1.0"?>
<\!-- "License"); -->
<description> Using 'local.realm' to be </description> {code}
When it should be returned as:
{code:shell} bash-3.2$ echo "
<?xml version=\"1.0\"?> <"\!"'--\"License\"); -->
<description> Using 'local.realm' to be </description> " <?xml version="1.0"?> <!'--"License"); --> <description> Using 'local.realm' to be </description> {code}