From 9444ef095f2b22be7dea71215a8253fbc2aa3fc1 Mon Sep 17 00:00:00 2001 From: Stephan Hradek Date: Sun, 12 Jan 2014 23:37:11 +0100 Subject: [PATCH] I feel ashamed :( Somehow this slipped me :( Sorry! --- core/modules/filters/field.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/modules/filters/field.js b/core/modules/filters/field.js index 7657f8441..efbcd50df 100644 --- a/core/modules/filters/field.js +++ b/core/modules/filters/field.js @@ -21,12 +21,13 @@ exports.field = function(source,operator,options) { function checkTiddler(title) { var tiddler = options.wiki.getTiddler(title); if(tiddler) { - var match; + var match, + text = tiddler.getFieldString(operator.operator.replace(/:$/, "")); if(operator.regexp) { - match = !! operator.regexp.exec(tiddler.getFieldString(operator.operator)); + match = !! operator.regexp.exec(text); } else { - match = tiddler.getFieldString(operator.operator) === operator.operand; + match = text === operator.operand; } if(operator.prefix === "!") { match = !match;