Uploaded image for project: '{RETIRED} CKEditor Integration'
  1. {RETIRED} CKEditor Integration
  2. CKEDITOR-117

CKEditor saves crap when Grammarly browser plugin is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.10
    • 1.8.5
    • None
    • None

    Description

      To reproduce:

      • install grammarly (reproduced on Firefox and Chrome)
      • edit a page with CKEditor

      -> the following is added at the end of the page content:

      ~/~/
      (function(){(function n(e) {
                          function t(e) {
                              if (e.parentNode) if (e.childNodes.length > 1) {
                                  for (var t = document.createDocumentFragment(); e.childNodes.length > 0; ) {
                                      var n = e.childNodes[0];
                                      t.appendChild(n);
                                  }
                                  e.parentNode.replaceChild(t, e);
                              } else e.firstChild ? e.parentNode.replaceChild(e.firstChild, e) : e.parentNode.removeChild(e);
                          }
                          function n(e) {
                              if (e) try {
                                  for (var n = e.querySelectorAll(".gr_"), r = n.length, o = 0; r > o; o++) t(n[o]);
                              } catch (i) {}
                          }
                          function r(e) {
                              try {
                                  Object.defineProperty(e, "innerHTML", {
                                      get: function() {
                                          try {
                                              var t = e.ownerDocument.createRange();
                                              t.selectNodeContents(e);
                                              var r = t.cloneContents(), o = document.createElement("div");
                                              return o.appendChild(r), n(o), o.innerHTML;
                                          } catch (i) {}
                                      },
                                      set: function(t) {
                                          try {
                                              var n = e.ownerDocument.createRange();
                                              n.selectNodeContents(e), n.deleteContents();
                                              var r = n.createContextualFragment(t);
                                              e.appendChild(r);
                                          } catch (o) {}
                                      }
                                  });
                              } catch (t) {}
                          }
                          if (e) {
                              var o = e.cloneNode;
                              e.cloneNode = function(t) {
                                  var i = o.call(e, t);
                                  if (e.classList.contains("mceContentBody")) i.innerHTML = e.innerHTML, n(i); else try {
                                      r(i);
                                  } catch (a) {}
                                  return i;
                              }, r(e);
                          }
                      })(document.querySelector("[data-gramm_id='97cb85f1-bbed-b13b-8e6c-76db4a88bc58']")) })()
      ~/~/
      

      Probably something automatically put by grammarly but looks like this extension is used a lot and I can't reproduce with GWT editor or on other websites with rich text editor.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: