View | Details | Raw Unified | Return to bug 54011
Collapse All | Expand All

(-)org/apache/jasper/tagplugins/jstl/core/Out.java (-19 / +5 lines)
Lines 66-91 Link Here
66
        //if the escapeXml is specified, assign the value to it;
66
        //if the escapeXml is specified, assign the value to it;
67
        ctxt.generateJavaSource("boolean " + strEscapeXmlName + " = true;");
67
        ctxt.generateJavaSource("boolean " + strEscapeXmlName + " = true;");
68
        if(hasEscapeXml){
68
        if(hasEscapeXml){
69
            ctxt.generateJavaSource(strEscapeXmlName + " = Boolean.parseBoolean((");
69
            ctxt.generateJavaSource(strEscapeXmlName + " = ");
70
            ctxt.generateAttribute("default");
70
            ctxt.generateAttribute("escapeXml");
71
            ctxt.generateJavaSource(").toString());");
71
            ctxt.generateJavaSource(";");
72
        }
72
        }
73
        
73
        
74
        //main part. 
74
        ctxt.generateJavaSource("org.apache.jasper.tagplugins.jstl.Util.out(out, " + strValName + ", " + strDefName + ", " + strEscapeXmlName + ");");
75
        ctxt.generateJavaSource("if(null != " + strValName +"){");
75
76
        ctxt.generateJavaSource("    if(" + strEscapeXmlName + "){");
77
        ctxt.generateJavaSource("        " + strValName + " = org.apache.jasper.tagplugins.jstl.Util.escapeXml(" + strValName + ");");
78
        ctxt.generateJavaSource("    }");
79
        ctxt.generateJavaSource("    out.write(" + strValName + ");");
80
        ctxt.generateJavaSource("}else{");
81
        ctxt.generateJavaSource("    if(null != " + strDefName + "){");
82
        ctxt.generateJavaSource("        if(" + strEscapeXmlName + "){");
83
        ctxt.generateJavaSource("            " + strDefName + " = org.apache.jasper.tagplugins.jstl.Util.escapeXml(" + strDefName + ");");
84
        ctxt.generateJavaSource("        }");
85
        ctxt.generateJavaSource("        out.write(" + strDefName + ");");
86
        ctxt.generateJavaSource("    }else{");
87
        ctxt.generateBody();
88
        ctxt.generateJavaSource("    }");
89
        ctxt.generateJavaSource("}");   
90
    }
76
    }
91
}
77
}

Return to bug 54011