Forum Stats

  • 3,838,654 Users
  • 2,262,389 Discussions
  • 7,900,724 Comments

Discussions

BUG: JDeveloper 11G - \" inside string

610520
610520 Member Posts: 27
edited Oct 15, 2008 10:50AM in JDeveloper and ADF
Hi!

Taste the difference:

+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"+
+"http://www.w3.org/TR/html4/loose.dtd">+
+<%@ page contentType="text/html;charset=windows-1251"%>+
+<html>+
+ <head>+
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/>+
+ <title>test</title>+
+ </head>+
+<% String s=true?"onload=('top.location.replace(\"test.jsp\");')":""; %>;+
+ <body <%=true?"onload=('top.location.replace(\"{color:#ff0000}_test.jsp\");')":""_{color}%>>+
+ </body>+
+</html>+

Why JDeveloper editor show error on second variant?
Tagged:

Comments

  • Frank Nimphius-Oracle
    Frank Nimphius-Oracle Member Posts: 29,689 Bronze Badge
    Hi the stings seems identical to me. However, the code seems kind of malfunctioning to ma anyway

    <% String s=true?"onload=('top.location.replace(\"test.jsp\");')":""; %>;

    this is no comparison. You assign the value true to the String s. To use the notation you want, this would have been a check for equality "=="

    <%=true?

    What is "true" ? Is it a variable you defined ? The directive you use is one where you assign values to a variable

    Frank
  • Hi Frank,
    this is not a problem of the semantics of the string...

    I could reproduce it with a string like this
    "onload('top.location.replace(\"file\")'"
    or even
    " ' \" \" ' "
    . The editor is not complaining when you remove the
    \"
    .

    --olaf
This discussion has been closed.