Commit b5073768 authored by Daniel Cothran's avatar Daniel Cothran
Browse files

Issue #3262607 by andileco: Last commit to discount HTML in count leading to stripping of HTML

parent 5397a9e4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
    this.linkClassOpen = field.attr('data-link-class-open');
    this.linkClassClose = field.attr('data-link-class-close');
    this.text = this.content.text();
    this.html = this.content.html();
    this.showMore = Drupal.t(this.linkTextOpen);
    this.showLess = Drupal.t(this.linkTextClose);

@@ -78,14 +79,14 @@

      if (this.state === 'expanded') {
        // Trim the content content to a predefined number of characters.
        content = this.trimText(this.text);
        content = this.trimText(this.html);

        linkText = this.showMore;
        linkClass = 'ec-toggle-link ' + this.linkClassOpen;
        this.state = 'collapsed';
      }
      else {
        content = this.text;
        content = this.html;
        linkText = this.showLess;
        linkClass = 'ec-toggle-link ' + this.linkClassClose;
        this.state = 'expanded';