value with ampersand in dropdown list (oxy_combobox)

Oxygen general issues.
bean1801
Posts: 2
Joined: Wed Jun 09, 2021 6:38 pm

value with ampersand in dropdown list (oxy_combobox)

Post 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?
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: value with ampersand in dropdown list (oxy_combobox)

Post 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
form-controls.png (1.98 KiB) Viewed 702 times
I hope I understood the situation... You can send us some samples on support@oxygenxml.com if you case if different.

Best regards,
Alex
Attachments
form-controls.png
form-controls.png (1.98 KiB) Viewed 702 times
Post Reply