/*
 *  Showdown XSS Filter extension
 *  https://github.com/VisionistInc/showdown-xss-filter
 *  2015, Visionist, Inc.
 *  License: MIT
 */
(function() {

  // Server-side import
  if (typeof module !== 'undefined') {
    filterXSS = require('xss');
  }

  // Filter out potential XSS attacks before rendering HTML
  var xssfilter = function (converter) {
    return [
      {
        type: "lang",
        filter: function(text) {
          return filterXSS(text);
        }
      }
    ];
  };

  // Client-side export
  if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) {
    window.Showdown.extensions.xssfilter = xssfilter;
  }

  // Server-side export
  if (typeof module !== 'undefined') {
    module.exports = xssfilter;
  }
})();

/*
 *  Showdown XSS Filter extension
 *  https://github.com/VisionistInc/showdown-xss-filter
 *  2015, Visionist, Inc.
 *  License: MIT
 */
(function() {

  // Server-side import
  if (typeof module !== 'undefined') {
    filterXSS = require('xss');
  }

  // Filter out potential XSS attacks before rendering HTML
  var xssfilter = function (converter) {
    return [
      {
        type: "lang",
        filter: function(text) {
          return filterXSS(text);
        }
      }
    ];
  };

  // Client-side export
  if (typeof window !== 'undefined' && window.showdown && window.showdown.extensions) {
    window.showdown.extensions.xssfilter = xssfilter;
  }

  // Server-side export
  if (typeof module !== 'undefined') {
    module.exports = xssfilter;
  }
})();

Update extension to work with latest showdown version
Update extension to work with latest showdown version

From showdown v1.0.0 and onward, the namespace changed from `Showdown` to `showdown`. This change reflect the new namespace, making it compatible with the latest version