sahat/satellizer

View on GitHub
examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js

Summary

Maintainability
C
1 day
Test Coverage

Function htmlParser has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function htmlParser(html, handler) {
  if (typeof html !== 'string') {
    if (html === null || typeof html === 'undefined') {
      html = '';
    } else {
Severity: Major
Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 4 hrs to fix

    File angular-sanitize.js has 311 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @license AngularJS v1.3.13
     * (c) 2010-2014 Google, Inc. http://angularjs.org
     * License: MIT
     */
    Severity: Minor
    Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 3 hrs to fix

      Function htmlSanitizeWriter has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function htmlSanitizeWriter(buf, uriValidator) {
        var ignore = false;
        var out = angular.bind(buf, buf.push);
        return {
          start: function(tag, attrs, unary) {
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                  if (handler.comment) handler.comment(html.substring(4, index));
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                  if (match) {
                    html = html.replace(match[0], '');
                    chars = false;
                  }
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                  } else if (BEGING_END_TAGE_REGEXP.test(html)) {
                    match = html.match(END_TAG_REGEXP);
            
                    if (match) {
                      html = html.substring(match[0].length);
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 45 mins to fix

              There are no issues that match your filters.

              Category
              Status