public static String interpolate(List<Object> prepared, JadeModel model, ExpressionHandler expressionHandler) throws ExpressionException {

		StringBuffer result = new StringBuffer();

		for (Object entry : prepared) {
			if (entry instanceof String) {
				result.append(entry);
			} else if (entry instanceof ExpressionString) {
				ExpressionString expression = (ExpressionString) entry;
				String stringValue = "";
				String value = expressionHandler.evaluateStringExpression(expression.getValue(), model);
				if (value != null) {
					stringValue = value;
				}
				if (expression.isEscape()) {
					stringValue = escapeHTML(stringValue);
				}
				result.append(stringValue);
			}
		}

		return result.toString();
	}
public static String interpolate ( List < Object > prepared , JadeModel model , ExpressionHandler expressionHandler ) throws ExpressionException { StringBuffer result = new StringBuffer ( ) ; for ( Object entry : prepared ) { if ( entry instanceof String ) { result . append ( entry ) ; } else if ( entry instanceof ExpressionString ) { ExpressionString expression = ( ExpressionString ) entry ; String stringValue = "" ; String value = expressionHandler . evaluateStringExpression ( expression . getValue ( ) , model ) ; if ( value != null ) { stringValue = value ; } if ( expression . isEscape ( ) ) { stringValue = escapeHTML ( stringValue ) ; } result . append ( stringValue ) ; } } return result . toString ( ) ; }
}