ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Escape characters in grid inline edit
Title:
B
I
{code}
?
I have value in database - `sometext "sometext"` I use ajaxradiolist with combobox. When I open drop down - this value is written as is. But when I select it, it becomes like - `sometext"sometext"` After that I get error message, that I try to use dangerous symbols etc. Is it possible to see in combobox's textbox same value, as i see in dropdown list? Also, If i start inline grid edit that value, I can see only part on value before quotes - sometext.
Save Changes
Cancel
Aleksander Seregin
asked at 22 Nov 2017
are you sure that in the database the value is not stored html encoded: `txt"text"`
at 22 Nov 2017
Omu
I open SQL management studio and edit data, filling 2 same quotes. But ajaxradiolist converts into html-encoded only last one
at 22 Nov 2017
Aleksander Seregin
edit `awem.js` find `function unesc` // str = str.replace(entityMap[key], key); replace this line with the next str = str.split(entityMap[key]).join(key);
at 22 Nov 2017
Omu
Behaviour didn't changed: I still get first normal quote and second html-encoded And inline edit doesn't show text after first word 'sometext'
at 22 Nov 2017
Aleksander Seregin
try Ctrl+Shift+R in chrome, if it still doesn't work show this in a miniproject http://aspnetawesome.com/learn/mvc/CommonProblems#Isolate-the-problem
at 22 Nov 2017
Omu
I can easily reproduce that on your online demo here: http://demo.aspnetawesome.com/GridInlineEditDemo Just rename any field in something with double quotes, save and edit again. All text inside quotes will disappear. That's definetely awe issue
at 22 Nov 2017
Aleksander Seregin
well, that would be a slightly different problem, the one where you select an item from combobox dropdown should be fixed by the code change above;
at 22 Nov 2017
Omu
for the grid inline editing in `awem.js` find `format.split('#Value').join(value)` replace with `format.split('#Value').join(escape(value))`
at 22 Nov 2017
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK