You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/06/30 05:37:19 UTC

[25/32] incubator-guacamole-client git commit: GUACAMOLE-55: Strip any images which may be present prior to assigning text content.

GUACAMOLE-55: Strip any images which may be present prior to assigning text content.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/6ee4264a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/6ee4264a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/6ee4264a

Branch: refs/heads/master
Commit: 6ee4264a218b8194d746672b7d20d1141e17df48
Parents: c68cedd
Author: Michael Jumper <mj...@apache.org>
Authored: Wed Jun 29 16:11:20 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Jun 29 16:11:20 2016 -0700

----------------------------------------------------------------------
 .../src/main/webapp/app/clipboard/services/clipboardService.js    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/6ee4264a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js b/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
index 9c43ab4..bfbec64 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;