{"size": 1519, "ext": "js", "max_stars_repo_path": "jspm_packages/github/aurelia/templating-resources@0.11.1/sanitize-html.js", "max_stars_repo_name": "martingust/martingust.github.io", "max_stars_repo_stars_event_min_datetime": "2015-10-14T15:27:34.000Z", "max_stars_repo_stars_event_max_datetime": "2015-10-14T15:27:34.000Z", "max_issues_repo_path": "jspm_packages/github/aurelia/templating-resources@0.11.1/sanitize-html.js", "max_issues_repo_name": "martingust/martingust.github.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "jspm_packages/github/aurelia/templating-resources@0.11.1/sanitize-html.js", "max_forks_repo_name": "martingust/martingust.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.3255813953, "max_line_length": 163, "alphanum_fraction": 0.6793943384}
System.register(['aurelia-binding'], function (_export) {
  var valueConverter, SCRIPT_REGEX, SanitizeHtmlValueConverter;

  var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

  return {
    setters: [function (_aureliaBinding) {
      valueConverter = _aureliaBinding.valueConverter;
    }],
    execute: function () {
      'use strict';

      SCRIPT_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;

      SanitizeHtmlValueConverter = (function () {
        function SanitizeHtmlValueConverter() {
          _classCallCheck(this, _SanitizeHtmlValueConverter);

          this.sanitizer = SanitizeHtmlValueConverter.defaultSanitizer;
        }

        var _SanitizeHtmlValueConverter = SanitizeHtmlValueConverter;

        _SanitizeHtmlValueConverter.defaultSanitizer = function defaultSanitizer(untrustedMarkup) {
          return untrustedMarkup.replace(SCRIPT_REGEX, '');
        };

        _SanitizeHtmlValueConverter.prototype.toView = function toView(untrustedMarkup) {
          if (untrustedMarkup === null) {
            return null;
          }

          return this.sanitizer(untrustedMarkup);
        };

        SanitizeHtmlValueConverter = valueConverter('sanitizeHtml')(SanitizeHtmlValueConverter) || SanitizeHtmlValueConverter;
        return SanitizeHtmlValueConverter;
      })();

      _export('SanitizeHtmlValueConverter', SanitizeHtmlValueConverter);
    }
  };
});