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)
Special Characters in Workflow comments
nipper
This is a pain, since users like using characters like &.
Initial a WF, the comment like "Please approve this & that"
fails with invalid WF at line #.
Should be a bug (detect and disallow special cahracters & provide a reasonable error message).
Are there any workarounds to this ? I can try to train everyone but itwill keep coming up.
Andy
Find more posts tagged with
Comments
Adam Stoller
Are you talking about comments placed within the WFT itself, or comments entered during task transition, or something else?
--fish
(Interwoven Senior Technical Consultant)
johnjamesmarsh
Andy,
I had a similar problem and have solved it. It is UTF8. Use the following at the top of your workflows:
<?xml version="1.0" encoding="UTF-8" standalone = "no"?>
Don't know if that will solve your problem but the only character I now have problems with is ' (as I use it around the strings).
Hope that helps,
John
nipper
When a WF is started, the inital comments (not follow on transition comments) are used in the description of the job.
Since this is the first text a user sees about the job, we want it to be good.
If I put in Please Approve this & that, the following XML gets created:
<workflow name = "ImportantJob" owner = "me" creator = "me" description = "Please Approve this & that">
& I get a nasty message that says Invalid Workflow at Line 7.
So I get called a lot. I imagine IW support gets called a lot. Unless youknow what to look for (I do now) this is a **** to find because in repeat testing , people get lazy and type asdf as the comment. Problem gone.
A simple regex to look for special characters & present a meaningful error message (or, better yet, escape them and proceed) would make a lot of lives much easier.
The problem is that, since this is before the WF ever starts, I do not think there is anything a WF developer can do to avoid this. Please tell me I am wrong & there is a workaround.
I just put 85 users in prod, this is a problem I expect to hear form many of them.
Andy
johnjamesmarsh
So the problem is that the characters they are entering are being used by you in the XML document as the description. There are a couple of functions that should help with that.
TeamSite::CGI_lite::escape_html_data
TeamSite::CGI_lite->unescape_html_data
There are other functions around too that will escape data into various formats but I think the escape_html_data is what you want.
John
Jeremy
Hi,
There is also another way of doing this - I'm not in the office so can't remember the exact code, but I have seen it on the DevNet before.
Once you've captured your comments from the screen using the TAG_info bit, you can assign these values to variables.
I think it was something like
$desc = __VALUE__(desc,'html');
I know it is in the manuals, but again I don't know where about as I don't have them handy.
But I am sure someone will pipe up here with exact details.
Hope this helps
Jeremy
nipper
I resolved this. I was using __INSERT__ rather than __TAG__
TAG cleans the XML, so it works great.
ANdy