Page 1 of 1

edit page double quotes interpreted as html markup

Posted: Thu Feb 23, 2023 11:30 am
by chm98

I have a varchar column that goes: some dummy text "and some double quoted dummy text"

but when edit the value is parsed by Html.Raw() in the generated code and the double quotes are interpreted as html markup:

<input type="text" data-table="FormData" data-field="x_myField" name="x_myField" id="x_myField" size="30" maxlength="50" placeholder="" value="some dummy text " and="" some="" double="" quoted="" dummy="" text""class="form-control">

Any setting I should check to prevent this?


Re: edit page double quotes interpreted as html markup

Posted: Fri Feb 24, 2023 6:36 am
by MichaelG

You can Html Encode the value first in the Row_Rendered server event. For example:

Field.EditValue = HtmlEncode(Field.CurrentValue);


Re: edit page double quotes interpreted as html markup

Posted: Fri Feb 24, 2023 12:53 pm
by chm98

MichaelG wrote:

You can Html Encode the value first in the Row_Rendered server event. For
example:

Field.EditValue = HtmlEncode(Field.CurrentValue);

Thank you and yes, that could temporally solve my issue.

So there isn't a setting where I can set it once for all? Seems quite bothersome to encode every field....


Re: edit page double quotes interpreted as html markup

Posted: Tue Feb 28, 2023 2:46 pm
by Webmaster

Please remove the Row_Rendered server event, update to the latest template (Tools -> Update Template) and try again.


Re: edit page double quotes interpreted as html markup

Posted: Wed Mar 01, 2023 10:52 am
by chm98

Webmaster wrote:

Please remove the Row_Rendered server event, update to the latest template (Tools
-> Update Template) and try again.

Perfect now. Thanks!