code: function endTagInText(p, token) {
      if (token.tagName === $.SCRIPT) {
          p.pendingScript = p.openElements.current;
      }
  
      p.openElements.pop();
      p.insertionMode = p.originalInsertionMode;
  }
docs: The "text" insertion mode ------------------------------------------------------------------