5252import org .labkey .test .params .experiment .SampleTypeDefinition ;
5353import org .labkey .test .util .DataRegionExportHelper ;
5454import org .labkey .test .util .DataRegionTable ;
55+ import org .labkey .test .util .EscapeUtil ;
5556import org .labkey .test .util .ExcelHelper ;
5657import org .labkey .test .util .PortalHelper ;
5758import org .labkey .test .util .SampleTypeHelper ;
@@ -248,7 +249,7 @@ public void testCreateSampleTypeNoExpression()
248249 public void testCustomProperties ()
249250 {
250251 final String sampleTypeName = "SampleTypeCustomProps" + DOMAIN_TRICKY_CHARACTERS ;
251- FieldInfo stringCol1 = new FieldInfo (TestDataGenerator .randomFieldName ("StringColPlain" , " \" " ), ColumnType .String );
252+ FieldInfo stringCol1 = new FieldInfo (TestDataGenerator .randomFieldName ("StringColPlain" ), ColumnType .String );
252253 FieldInfo stringCol2 = new FieldInfo (TestDataGenerator .randomFieldName ("StringCol%" ), ColumnType .String );
253254 // Used to make sure the details page shows properties with null values
254255 FieldInfo stringCol3 = new FieldInfo (TestDataGenerator .randomFieldName ("StringColNull" ), ColumnType .String );
@@ -257,7 +258,7 @@ public void testCustomProperties()
257258 stringCol1 .getFieldDefinition (),
258259 stringCol2 .getFieldDefinition (),
259260 stringCol3 .getFieldDefinition (),
260- calcCol .getFieldDefinition ().setValueExpression (" \" " + stringCol1 .getName () + " \ " || 'Concat'" )
261+ calcCol .getFieldDefinition ().setValueExpression (EscapeUtil . getSqlQuotedValue ( stringCol1 .getName ()) + " || 'Concat'" )
261262 );
262263
263264 SampleTypeDefinition sampleTypeDefinition = new SampleTypeDefinition (sampleTypeName ).setFields (fields );
0 commit comments