mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
Remove string.js dependency
This commit is contained in:
@@ -4,7 +4,6 @@ var async = require('async');
|
||||
var winston = require('winston');
|
||||
var cron = require('cron').CronJob;
|
||||
var nconf = require('nconf');
|
||||
var S = require('string');
|
||||
var _ = require('lodash');
|
||||
|
||||
var db = require('./database');
|
||||
@@ -56,7 +55,7 @@ Notifications.getMultiple = function (nids, callback) {
|
||||
notification.datetimeISO = utils.toISOString(notification.datetime);
|
||||
|
||||
if (notification.bodyLong) {
|
||||
notification.bodyLong = S(notification.bodyLong).escapeHTML().s;
|
||||
notification.bodyLong = utils.escapeHTML(notification.bodyLong);
|
||||
}
|
||||
|
||||
notification.user = usersData[index];
|
||||
@@ -470,7 +469,7 @@ Notifications.merge = function (notifications, callback) {
|
||||
});
|
||||
var numUsers = usernames.length;
|
||||
|
||||
var title = S(notifications[modifyIndex].topicTitle || '').decodeHTMLEntities().s;
|
||||
var title = utils.decodeHTMLEntities(notifications[modifyIndex].topicTitle || '');
|
||||
var titleEscaped = title.replace(/%/g, '%').replace(/,/g, ',');
|
||||
titleEscaped = titleEscaped ? (', ' + titleEscaped) : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user