enhancing™️ post reply length checker to account for line breaks in redactor

v1.18.x
Julian Lam 8 years ago
parent f6721c249f
commit 8226fd6566

@ -329,7 +329,7 @@ module.exports = function (Topics) {
function check(item, min, max, minError, maxError, callback) {
// Trim and remove HTML (latter for composers that send in HTML, like redactor)
if (typeof item === 'string') {
item = S(item.trim()).stripTags().s;
item = S(item).stripTags().s.trim();
}
if (!item || item.length < parseInt(min, 10)) {

Loading…
Cancel
Save