~openteachermaintainers/openteacher/3.x

« back to all changes in this revision

Viewing changes to modules/org/openteacher/logic/webDatabase/db_skeleton/validationLib.js

  • Committer: Marten de Vries
  • Date: 2017-06-28 18:05:48 UTC
  • Revision ID: git-v1:b4c406307aa345c58b9904b76580f15c5bff2a4e
Move JS into npm modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        along with OpenTeacher.  If not, see <http://www.gnu.org/licenses/>.
18
18
*/
19
19
 
 
20
var isSafeHtml = require('is_safe_html');
 
21
 
20
22
exports.assertSafeHtml = function (text) {
21
23
        if (!isSafeHtml(text)) {
22
24
                throw({forbidden: "'" + text + "' isn't safe HTML."});