From 72e3ea1381e8ac7f233f34ed9793e4ed656b6123 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 17 Sep 2015 16:07:49 -0400 Subject: [PATCH] Use check-types.contains to express intent a bit better --- sanitiser/_ids.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanitiser/_ids.js b/sanitiser/_ids.js index 98c32946..0194da02 100644 --- a/sanitiser/_ids.js +++ b/sanitiser/_ids.js @@ -48,7 +48,7 @@ function sanitize( raw, clean ){ var id = rawId.substring(param_index + 1); // check id format - if(param_index === -1 || !check.unemptyString( id ) || !check.unemptyString( type )) { + if(!check.contains(rawId, ID_DELIM) || !check.unemptyString( id ) || !check.unemptyString( type )) { messages.errors.push( formatError(rawId) ); } // type text must be one of the types