Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Encoding HML in DCR's Issue
PaulD
I'm hoping this is an easy one. Using TS 6.1's perl installation to import some data into forms on the server. Some of the data needs to be encoded before I put it in the DCR, like this line,eg:
2<THSpace></THSpace>PCI and 2<THSpace></THSpace>PCI<Hyphen></Hyphen>
But when I use HTML::Entities::encode on that string only the less than character is encoded! How do I get it to encode both the < and the >? Am I using the wrong method?
2<THSpace></THSpace>PCI and 2<THSpace></THSpace>PCI<Hyphen></Hyphen>
thanks in advance,
Paul
Find more posts tagged with
Comments
Adam Stoller
I think you only actually *need* to encode the less-than sign in that case - however, if you read the documentation for HTML::Entities you should see information about how you can pass to it a list of characters you want encoded (note: Perl and the modules it comes with change when you get to 6.5 - I believe 6.1 still uses Perl 5.0005_03, 6.5 uses Perl 5.8.2)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jbonifaci
FYI, 6.1 uses perl v5.8.2 as well.
~Jeff
Adam Stoller
Somehow I have a feeling I'll keep mis-remembering that (maybe it was 6.0 that hadn't upgraded Perl?) - thanks.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
PaulD
If that's all i need then I should be all set. And yea, I tried adding a list but the function would crash. The documentation made it sound like only the items in my provided list would be converted and that wasn't what I wanted ...
here's the list I tried:
'<>/' (single quotes)
and
"\<\>\/" (double quotes)
thanks for the reply
Paul