Project: Birt
Bug 234129 [Automation][Regression]& in script save as &amp in xml
Reported: 2008-05-27 07:40:25 | Status: closed fixed

Description: If user input "&" in script, it is saved as &amp in xml. This bug cause a unhandled exception when execute script. Test Date: 20080527 Test Build: BIRT2.3.0 v20080527-1241 Step to reproduce: 1. New a label 2. Add script onRender "if (1 == 1 && 2 == 2) this.getStyle().backgroundColor = "red";" 3. Preview it Expect result: Report can be previewed correctly. Actual result: A unhandled expcection throw out. Error log: Error.UnhandledScriptError ( 1 time(s) ) detail : org.eclipse.birt.report.engine.api.EngineException: Unhandled exception when executing script. at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:199) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:176) at org.eclipse.birt.report.engine.script.internal.LabelScriptExecutor.handleOnRender(LabelScriptExecutor.java:89) at org.eclipse.birt.report.engine.script.internal.OnRenderScriptVisitor.visitLabelItem(OnRenderScriptVisitor.java:132) at org.eclipse.birt.report.engine.ir.LabelItemDesign.accept(LabelItemDesign.java:47) at org.eclipse.birt.report.engine.script.internal.OnRenderScriptVisitor.onRender(OnRenderScriptVisitor

Files changed in fix:
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/PropertyState.java