From 6ee4264a218b8194d746672b7d20d1141e17df48 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 29 Jun 2016 16:11:20 -0700 Subject: [PATCH] GUACAMOLE-55: Strip any images which may be present prior to assigning text content. --- .../src/main/webapp/app/clipboard/services/clipboardService.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js b/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js index 9c43ab455..bfbec647f 100644 --- a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js +++ b/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js @@ -306,6 +306,9 @@ angular.module('clipboard').factory('clipboardService', ['$injector', */ service.setTextContent = function setTextContent(element, text) { + // Strip out any images + $(element).find('img').remove(); + // Reset text content only if doing so will actually change the content if (service.getTextContent(element) !== text) element.textContent = text;