Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/vendor/magento/module-ui/view/base/web/js/grid/cells/
Upload File :
Current File : //home/rtorresani/www/vendor/magento/module-ui/view/base/web/js/grid/cells/sanitizedHtml.js

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

define([
    'Magento_Ui/js/grid/columns/column',
    'escaper'
], function (Column, escaper) {
    'use strict';

    return Column.extend({
        defaults: {
            allowedTags: ['div', 'span', 'b', 'strong', 'i', 'em', 'u', 'a']
        },

        /**
         * Name column.
         *
         * @param {String} label
         * @returns {String}
         */
        getSafeHtml: function (label) {
            return escaper.escapeHtml(label, this.allowedTags);
        },

        /**
         * UnsanitizedHtml version of getSafeHtml.
         *
         * @param {String} label
         * @returns {String}
         */
        getSafeUnsanitizedHtml: function (label) {
            return this.getSafeHtml(label);
        }
    });
});