HtmlUtils.htmlToPlain(scriptContext.getStackFront().getText())));
}
final ScriptingPermissions restrictedPermissions = ScriptingPermissions.getFormulaPermissions();
try {
if (ENABLE_CACHING) {
final FormulaCache formulaCache = getFormulaCache(nodeModel.getMap());
Object value = formulaCache.get(nodeModel, text);
if (value == null) {
try {
value = ScriptingEngine.executeScript(nodeModel, text, scriptContext, restrictedPermissions);
formulaCache.put(nodeModel, text, value);
if (DEBUG_FORMULA_EVALUATION)
System.err.println("eval: cache miss: recalculated: " + text);
}
catch (ExecuteScriptException e) {
formulaCache.put(nodeModel, text, e);
if (DEBUG_FORMULA_EVALUATION)
System.err.println("eval: cache miss: exception for: " + text);
throw e;
}
}