How to use the stripTags function from underscore.string
Find comprehensive JavaScript underscore.string.stripTags code examples handpicked from public code repositorys.
GitHub: ryanlelek/Raneto
23 24 25 26 27 28 29 30 31 32
); const body = marked(content); const title = meta.title ? meta.title : contentProcessors.slugToTitle(slug); const excerpt = _s.prune( _s.stripTags(_s.unescapeHTML(body)), config.excerpt_length || 400 ); return {
449
0
0
GitHub: PastVu/pastvu
387 388 389 390 391 392 393 394 395 396 397 398 399
'use strict'; let result = txt; result = result.replace(/<br\s*[/]?>/gi, brShrink ? ' ' : '\n'); // Заменяем <br> на \n или ничего result = _s.stripTags(result); // Убираем обрамляющие тэги ahref result = _s.unescapeHTML(result); // Возвращаем эскейпленные return result; };
14
70
0
+ 6 other calls in file
13 14 15 16 17 18 19 20 21 22
// Skip if Search not present if (!req.query.search) { return next(); } // remove < and > var tagFreeQuery = _s.stripTags(req.query.search); // remove /, ', " and & from query var invalidChars = '&\'"/'; var sanitizedQuery = validator.blacklist(tagFreeQuery, invalidChars);
0
1
0
GitHub: 0717376/raneto
14 15 16 17 18 19 20 21 22 23
// Skip if Search not present if (!req.query.search) { return next(); } // remove < and > var rawQuery = _s.stripTags(req.query.search); var sanitizedQuery = sanitize(rawQuery); // Using try/catch seems broken var searchResults = [];
0
0
0
underscore.string.slugify is the most popular function in underscore.string (323 examples)