<script> alert("<c:out value='${foo}' escapeXml='false'/>"); <script>
Quoting [EMAIL PROTECTED]: > Hello, > > I'm having some JSTL difficulties that I haven't encountered before. > I have a string with a single quote in it: > > <c:set var="foo" value="Foo's Moos"/> > > If I just print that out (c:out), JSTL converts the single quote to > ' and my browser recognizes that and renders it as a single quote. > Good. > > However, if I try using this variable in, say, this piece of > Javascript: > <script> > alert("<c:out value='${foo}'/>"); > <script> > > then this will not work - the problem is that JSTL does ' --> ' > conversion, and Javascript doesn't like something in '. Most > likely it's the semi-column that bothers it. > > So, I've been trying to figure out how to stop this taglib from doing ' > --> ' conversion and I just cannot find a way to do this. > > Is this at all possible? > > If anyone has any other ideas for working around this problem, please > let me know. > > Thanks, > Otis > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]