I've verified that all the variables below are populated. If my EA ($odcrmd_description) does not contain quotes in its value then the command works fine. If they are present in the value then it does not work. Does anyone have an suggestions or workaround based on a similar experience.$res = `$iwhome/bin/iwextattr -s "TeamSite/Metadata/Description=$odcrmd_description" "$ofile"`;Thanks,- Tim
If you want quotes in odcrmd_description variable to be entered as a part of EA text as well, then you should escape the quotes. You could use a regex to escape the quotes in odcrmd_description variable before iwextattr command is executed.Is this what you wanted?
...use HTML::Entities;...my $edesc = encode_entities($odcrmd_description);my $res = qx($iwhome/bin/iwextattr -s "TeamSite/Metadata/Description=$edesc" "$ofile");...
You have to encode the quotes as entities for it to be accepted as an EA - e.g.:...use HTML::Entities;...my $edesc = encode_entities($odcrmd_description);my $res = qx($iwhome/bin/iwextattr -s "TeamSite/Metadata/Description=$edesc" "$ofile");...
I could see applications for using this module when outputing values from Templating entered by users. Sometimes the characters need to be escaped in order to display correctly in all browsers and the users do not always escape them. Have you used this .pm for that purpose. Is it prevelant in your implementations.
I've used the module before for different reasons. I don't know if I'd go as far as to say it's prevelant in my implementations - but I wouldn't call it a stranger either ;-)
Ok got it Is there a similar module that encodes html in utf-8?