mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-09 09:51:59 +02:00
enhancing™️ post reply length checker to account for line breaks in redactor
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user