value with ampersand in dropdown list (oxy_combobox)

<oXygen/> general issues.
bean1801
Posts: 1
Joined: Wed Jun 09, 2021 6:38 pm

value with ampersand in dropdown list (oxy_combobox)

Post by bean1801 » Wed Jun 09, 2021 6:44 pm

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 &amp;
This is quite normal for the text mode of the oxygen editor, but I also see &amp; in the author mode.

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

alex_jitianu
Posts: 834
Joined: Wed Nov 16, 2005 11:11 am

Re: value with ampersand in dropdown list (oxy_combobox)

Post by alex_jitianu » Thu Jun 10, 2021 2:33 pm

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 87 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 87 times

Post Reply