faulknercs / Knockstrap

Knockout bindings to twitter bootstrap 3
faulknercs.github.io/Knockstrap/
MIT License
142 stars 37 forks source link

Numeric button values cause f.replace error #53

Closed stevekrile closed 7 years ago

stevekrile commented 7 years ago

When using the button binding, using numeric values causes the code to error:

This WORKS `

                                            </div>`

And this FAILS

`

                                            </div>`
stevekrile commented 7 years ago

Consider changing code for Radio binding on row 903 from:

$radioButton = $(element).find('input[value="' + value.replace(/"/g, '\\"') + '"]'),

to

$radioButton = $(element).find('input[value="' + String(value).replace(/"/g, '\\"') + '"]'),

faulknercs commented 7 years ago

Fixed