Conversation
supportTesting with version 1.7.0 If I enter a Custom Validation for a field containing a quote (“), it breaks JS. This happens because the quote is not escaped in JS causing the following JS Error: SyntaxError: Unexpected identifier 'Title'. Expected '}' to end an object literal. ..as the following JS is invalid because of the quotes around “Title”: { failureMessage: "The "Title" field is required.",validMessage: " " ,jqObj: jqr } The error messages need to be escape using esc_js() when output in JavaScript to product the correct output: "The "Title" field is required." I am happy to provide a patch file or submit a PR if you have a GitHub account. Kind regards Ben This topic was modified 7 years ago by Ben Huson .
No comments were stored for this source.