All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lib.xp.examples.portal.sanitizeHtml.js Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
var portalLib = require('/lib/xp/portal');
var assert = require('/lib/xp/testing');

// BEGIN
var unsafeHtml = '

Link

' + ''; var sanitizedHtml = portalLib.sanitizeHtml(unsafeHtml); // END // BEGIN // Sanitized HTML returned. var expectedHtml = '

Link

'; // END assert.assertEquals(expectedHtml, sanitizedHtml);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy