devstaff-crete/DevStaff-Heraklion

View on GitHub
meetups/meetup06-MobileDev/x-platform/ionic/js/angular/angular-sanitize.js

Summary

Maintainability
C
1 day
Test Coverage

Function htmlParser has 107 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 {

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

    /**
     * @license AngularJS v1.4.3
     * (c) 2010-2015 Google, Inc. http://angularjs.org
     * License: MIT
     */

      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) {

        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);

          Avoid deeply nested control flow statements.
          Open

                  if (match) {
                    html = html.replace(match[0], '');
                    chars = false;
                  }

            Avoid deeply nested control flow statements.
            Open

                      if (handler.comment) handler.comment(html.substring(4, index));

              There are no issues that match your filters.

              Category
              Status