code: function cleanUrl(url) {
      'use strict';
      if (/^https?/.test(url.getScheme())) return url.toString();
      if (/^mailto?/.test(url.getScheme())) return url.toString();
      if ('data' == url.getScheme() && /^image/.test(url.getPath())) {
          return url.toString();
      }
  }
docs: https://bugzilla.mozilla.org/show_bug.cgi?id=255107