Skip to content

Commit

Permalink
Fixes #219
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvautin committed Mar 6, 2018
1 parent eac6af8 commit a7b6f65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![npm downloads badge](https://nodei.co/npm/openkb.png?downloads=true "npm download badge")

[![Build Status](https://travis-ci.org/mrvautin/openKB.svg?branch=master)](https://travis-ci.org/mrvautin/opnkb)
[![Build Status](https://travis-ci.org/mrvautin/openKB.svg?branch=master)](https://travis-ci.org/mrvautin/openkb)

openKB is a Markdown Knowledge base application (FAQ) built with [Nodejs](https://nodejs.org/) and [ExpressJS](http://expressjs.com/). The application uses an embedded database ([nedb](https://github.com/louischatriot/nedb))
by default but can also use a MongoDB server by changing the config (see below). The application is designed to be easy to use and install and based around search rather than nested categories. Simply search for what you want and select from the results.
Expand Down
9 changes: 8 additions & 1 deletion routes/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@ exports.getId = function (id){
if(id.length !== 24){
return id;
}
return ObjectID(id);

let returnID = '';
try{
returnID = ObjectID(id);
return returnID;
}catch(ex){
return id;
}
};

exports.sanitizeHTML = function(html){
Expand Down

0 comments on commit a7b6f65

Please sign in to comment.