Abuse Melding

Je hebt een klacht over de onderstaande posting:

23-06-2020, 00:11 door Anoniem

Een URL-sanitizing probleem. Dat moet toch voor een security vendor niet zo'n moeilijke opgaaf zijn om ziets netjes af te regelen. console.log(sanitizeHtml(html)); console.log(sanitizeHtml("")); console.log(sanitizeHtml("console.log('hello world')")); console.log(sanitizeHtml("")); npm install sanitize-html var sanitizeHtml = require('sanitize-html'); var dirty = 'some really tacky HTML'; var clean = sanitizeHtml(dirty); // Allow only a super restricted set of tags and attributes clean = sanitizeHtml(dirty, { allowedTags: [ 'b', 'i', 'em', 'strong', 'a' ], allowedAttributes: { 'a': [ 'href' ] }, allowedIframeHostnames: ['www.youtube.com'] }); clean = sanitizeHtml(dirty, { allowedTags: sanitizeHtml.defaults.allowedTags.concat([ 'img' ]) }); allowedTags: [ 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'abbr', 'code', 'hr', 'br', 'div', 'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'iframe' ], disallowedTagsMode: 'discard', ...

Beschrijf je klacht (Optioneel):

captcha