EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: varonica on September 24, 2014, 08:19:33 PM



Title: Combobox with a special character!!
Post by: varonica on September 24, 2014, 08:19:33 PM
I have no idea how to deal with those special characters. Please see below:
Code:
<input class="easyui-combobox" data-options="
                        valueField: 'label',
                        textField: 'value',
                        data: [{
                            label: 'java',
                            value: 'alc\\o\\h//ol'
                        },{
                            label: 'perl',
                            value: 'mr. john's'
                        },{
                            label: 'ruby',
                            value: '<script>alert(\'testggg\');</\script>'
                        }]" />


How can i make all of that to display as it was ? please help!! :'( :'(


Title: Re: Combobox with a special character!!
Post by: aswzen on September 25, 2014, 01:46:58 AM
you can use safe code..
http://www.utexas.edu/learn/html/spchar.html
http://www.degraeve.com/reference/specialcharacters.php

or in php
http://php.net/manual/en/function.htmlspecialchars.php


Title: Re: Combobox with a special character!!
Post by: varonica on September 25, 2014, 06:20:12 PM
Thanks, Agus Sigit Wisnubroto! That help me alot :)