[opencms-dev] Escaping commas as delimiters

Michael Varshavsky mvarshavsky at gmail.com
Thu Sep 24 20:28:48 CEST 2009


I'm running into an interesting problem that I'm guessing must have surfaced
before...

I've got an element in my XSD which is associated w/ a MultiSelectWidget.
That allows users to select multiple strings to serve as a value for that
particular element.
Those multiple values are stored underneath as comma separated values.

e.g.

Products
---A
---B
---C

if first two products are selected and the document is saved, in control
code underneath it gets saved as 'A,B'
The problem arises when one of the product names has a comma in its
description



Products
---A
---B,B1
---C

now in the control code underneath, it is saved with 'A,B,B1'.
Obviously that blurs the line between having two options 'A' and 'B,B1' and
three options 'A', 'B', and 'B1' which creates problems when I try to search
for things later.

I tried replacing commas w/ unicode values but that didn't work.

Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090924/3e5b883a/attachment.htm>


More information about the opencms-dev mailing list