# Textbox values are not escaped when template contains multiple textboxes bound to same model

**URL:** <https://forums.bitovi.com/t/textbox-values-are-not-escaped-when-template-contains-multiple-textboxes-bound-to-same-model/1108>\
**Category:** CanJS\
**Created:** [July 1, 2020, 11:58pm UTC](https://forums.bitovi.com/t/textbox-values-are-not-escaped-when-template-contains-multiple-textboxes-bound-to-same-model/1108 "2020-07-01T23:58:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dthorpe](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@dthorpe](https://forums.bitovi.com/u/dthorpe)\
**Post date:** [July 1, 2020, 11:58pm UTC](https://forums.bitovi.com/t/textbox-values-are-not-escaped-when-template-contains-multiple-textboxes-bound-to-same-model/1108/1 "2020-07-01T23:58:43Z")

</div>

Using version 2.3.28, I have a form with several text boxes with 'value’s bound to an attribute on a model. On submission of the form, I call attr(formParams) on the model, which causes a loop through the bound textboxes. The first one enters the ‘txt’ function in render.js and hits ‘value = compute()’ which then starts to loop through the other bound items, so the next textbox gets to the ‘txt’ function in render.js and so on.

The issue seems to be that the first time through, the ‘withinTemplatedSectionWithinAnElement’ flag is set to true, which will return escaped content. However, when it loops through the subsequent bound text boxes, the flag is false and will not return escaped content.

Is there a way around this?

---

<div class="post-metadata">

**Author:** ![cherif\_b](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/cherif_b/32/31_2.png) [@cherif\_b](https://forums.bitovi.com/u/cherif_b)\
**Post date:** [July 2, 2020, 8:06pm UTC](https://forums.bitovi.com/t/textbox-values-are-not-escaped-when-template-contains-multiple-textboxes-bound-to-same-model/1108/2 "2020-07-02T20:06:32Z")

</div>

Hi @dthorpe and welcome.  
Can you give a simplified example that describes the issue?  
An example in codePen or jsbin would help so much to understand the problem.
