Eduardo Yáñez Parareda wrote:
Hello, I don't get escape tag works fine.

<tr><td>'<str:escape>Test"tseT</str:escape>'</td></tr> <tr><td>"<str:escape>Test'tseT</str:escape>"</td></tr>

And this is what I get:

'Test\"tseT'
"Test'tseT"

So I don't get single quotes being escaped. Is there any bug with this tag?

Looks like :-)

A quick look at the source shows it's based on the commons-lang code
but that seems fine -- the following:

<jsp:directive.page import="org.apache.commons.lang.StringEscapeUtils"/>
<jsp:scriptlet>
        String foo = "Test\"tseT";
        String bar = "Test'tseT";
        out.println(StringEscapeUtils.escapeJavaScript(foo));
        out.println(StringEscapeUtils.escapeJavaScript(bar));
</jsp:scriptlet>

:: produces, as expected:

Test\"tseT
Test\'tseT

Not sure where the problem is, and no more time to look right now;
maybe later. Or you could file a bug report :-)

--
Hassan Schroeder ----------------------------- [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                          dream.  code.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to