edit page double quotes interpreted as html markup

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
chm98
User
Posts: 3

edit page double quotes interpreted as html markup

Post 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?


MichaelG
User
Posts: 1095

Post by MichaelG »

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

Field.EditValue = HtmlEncode(Field.CurrentValue);


chm98
User
Posts: 3

Post 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....


Webmaster
User
Posts: 9425

Post by Webmaster »

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


chm98
User
Posts: 3

Post 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!


Post Reply