limcheekin / jquery-validation-ui

JQuery Validation UI Plugin - Client Side Validation without writing JavaScript
http://limcheekin.github.io/jquery-validation-ui/
Apache License 2.0
20 stars 18 forks source link

Fix for issue #24: allow values to appear in client-side validation error messages #25

Closed jonroler closed 11 years ago

jonroler commented 11 years ago

This is a fix for issue #24. Without this fix, the javascript code to display the value of a value in an error message is shown to the user instead of showing the value itself. The problem is that the entire message including the javascript code to retrieve the field value was being "javascript encoded", which escapes all quotes in the string. The fix is to put a placeholder into the string, javascript encode it, and then replace the placeholder with the desired javascript code.