Page 1 of 1

value with ampersand in dropdown list (oxy_combobox)

Posted: Wed Jun 09, 2021 6:44 pm
by bean1801
I want to use the oxy_combobox control. One of my values contains an ampersand.
In the definition of the oxy_combobox control, I can specify the value with ampersand .

But when I use the combobox control productively in the my editor, the ampersand is replaced with &
This is quite normal for the text mode of the oxygen editor, but I also see & in the author mode.

Any idea on how to get the simple (non-escaped) ampersand back?

Re: value with ampersand in dropdown list (oxy_combobox)

Posted: Thu Jun 10, 2021 2:33 pm
by alex_jitianu
Hi,

I've tried a similar scenario with combo boxes for editing both an attribute value and an element value.

Code: Select all

* {
    display: block;
    content: 
        "Attribute: " oxy_combobox( 
            edit, '@attr',
            editable, false,
            values, 'value1&, value2&')
            
            "\A "
        
        "Text: " oxy_combobox( 
            edit, '#text',
            editable, false,
            values, 'value1&, value2&')
            
}
When the values are committed in the document the & gets escaped because is a special character used to escape other characters.

Code: Select all

<form attr="value2&amp;">value2&amp;</form> 
The form controls though present the & without escaping it:
form-controls.png
I hope I understood the situation... You can send us some samples on support@oxygenxml.com if you case if different.

Best regards,
Alex