diff --git a/library.js b/library.js index 4455671..bd4bffd 100644 --- a/library.js +++ b/library.js @@ -1,6 +1,6 @@ 'use strict'; -var S = require('string'); +var striptags = require('striptags'); var meta = module.parent.require('./meta'); var user = module.parent.require('./user'); @@ -29,7 +29,7 @@ library.addAdminNavigation = function(header, callback) { library.getTeasers = function(data, callback) { data.teasers.forEach(function(teaser) { if (teaser && teaser.content) { - teaser.content = S(teaser.content).stripTags('img').s; + teaser.content = striptags(teaser.content, ['img']); } }); callback(null, data); diff --git a/package.json b/package.json index 64e27fa..0419cad 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,6 @@ "url": "https://github.com/psychobunny/nodebb-theme-persona/issues" }, "dependencies": { - "string": "^3.3.3" + "striptags": "^3.1.0" } } diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..6ff84b8 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,7 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +striptags@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.0.tgz#763e534338d9cf542f004a4b1eb099e32d295e44"