Closed Dernerd closed 1 year ago
// Linked elements or callback if (typeof fb.callback === 'object') { // Set background/foreground color $(fb.callback).css({ backgroundColor: DOMPurify.sanitize(fb.color), // Sanitize the color input color: fb.hsl[2] > 0.5 ? '#000' : '#fff' });
// Change linked value
$(fb.callback).each(function() {
if (this.value && this.value !== DOMPurify.sanitize(fb.color)) { // Sanitize the color input
this.value = DOMPurify.sanitize(fb.color); // Sanitize the color input
}
});
} else if (typeof fb.callback === 'function') { fb.callback.call(fb, DOMPurify.sanitize(fb.color)); // Sanitize the color input }
Tracking issue for: