Good catch - it is fixed in changeset 165186. Thanks for pointing it out.
Don
Corey Probst wrote:
Hi. I have a question about the createDynamicJavascript() function in the JavascriptValidatorTag class in Struts 1.3. I am using the nightly builds (not building from source) and I noticed that my regular expression mask doesn't work anymore. I'm using the following regular expression... ^\d{5}(\-\d{4})?$ for zipcode + option 4.
The problem: In the function, code was added to escape the double quotes right after we escape the backward slash. But it uses the original value instead of the escaped value, like this...
String varValueEscaped = ValidatorUtils.replace(varValue, "\\", "\\\\"); varValueEscaped = ValidatorUtils.replace(varValue, "\"", "\\\"");
I think it should be...1 String varValueEscaped = ValidatorUtils.replace(varValue, "\\", "\\\\"); varValueEscaped = ValidatorUtils.replace(varValueEscaped, "\"", "\\\"");
So we don't lose the escaped backward slashes.
If I'm missing something, let me know. I didn't know if I should enter a bug or just send a note to the list since 1.3 isn't released yet.
Thanks, Corey
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]