[opencms-dev] Escaping commas as delimiters
Claus Priisholm
cpr at codedroids.com
Fri Sep 25 15:31:53 CEST 2009
The problem is that the individual values are not escaped. Ideally your
example value should end up something like this in the XML file:
'"A","B,B1"' (or a similar approach to escape special characters). As it
is, you cannot have values with commas without getting into trouble.
Michael Varshavsky wrote:
> 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?
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
--
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
--
Javadocs and other OpenCms stuff:
http://www.codedroids.com/community/opencms
More information about the opencms-dev
mailing list