MultiSelectDisplay and '&'

Nov 10, 2011 at 11:33 PM

Hi Marc,

Using this function, if the values returned by the lookup are something like this:  AA;BB;C&D;EE    the result is:   AA|BB|C&|D|EE   (the & is being read as & and the trailing semicolon is treated as another delimiter. Is there any way around this that you have come across?

thanks

Coordinator
Dec 30, 2011 at 3:47 PM

Sorry I never replied to this. Did you come up with a fix?

If not, can you explain a little more?

M.

Jan 3, 2012 at 6:30 AM
Edited Jan 3, 2012 at 6:32 AM

What I was trying to do was return the values in a Multi-select look up field separated by a line break and wrapped in an html anchor tag. The issue was a lot of the items had ampersands in the name, which are encoded as &amp ; while the template iterates over the returned row of data, with the substring-before() function looking for semicolons. 

Unfortunately, I couldn't find a decent way in XSL to identify/differentiate the semicolons in encoded characters, and am using javascript to process the results. I hate giving up but I was on a tight timeframe and had to move on to more pressing requirements, with the intention of going back and fixing this.

Jul 29, 2012 at 8:45 PM

I'm having similar issues as well, where the users have used single-quote marks in the lookup list. The string is being split on the quotes as well as the item delimiter because the quotes are encoded as '.

I've had no luck in my search, but is there a way to use the rendered string, instead of the encoded string (so we can delimit on a literal ';', and not the ones in the html entity codes?

Cheers,
Chris. 

Coordinator
Jul 30, 2012 at 5:59 PM

Chris:

Ampersands always make things messy; I'm working around that today myself. you end up having to do some string replacements to convert the ampersands from '&' to '&'. Apostrophes and quotes can cause similar problems.

M.