Browse Source

Use check-types.contains to express intent a bit better

pull/273/head
Julian Simioni 9 years ago
parent
commit
72e3ea1381
  1. 2
      sanitiser/_ids.js

2
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

Loading…
Cancel
Save