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:20 UTC
[26/32] incubator-guacamole-client git commit: GUACAMOLE-55: Render
tags as their alt text.
GUACAMOLE-55: Render <img> tags as their alt text.
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/3f372cce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/3f372cce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/3f372cce
Branch: refs/heads/master
Commit: 3f372cce68e480ce0cc0e28269b9db0b3e8f6f33
Parents: 6ee4264
Author: Michael Jumper <mj...@apache.org>
Authored: Wed Jun 29 16:31:18 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Jun 29 16:31:18 2016 -0700
----------------------------------------------------------------------
.../src/main/webapp/app/clipboard/services/clipboardService.js | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/3f372cce/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 bfbec64..f0529d8 100644
--- a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
+++ b/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
@@ -255,6 +255,10 @@ angular.module('clipboard').factory('clipboardService', ['$injector',
else if (current.nodeName === 'BR')
currentBlock += '\n';
+ // Render <img> as alt text, if available
+ else if (current.nodeName === 'IMG')
+ currentBlock += current.getAttribute('alt') || '';
+
// For all other nodes, handling depends on whether they are
// block-level elements
else {