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

This commit is contained in:
Michael Jumper
2016-06-29 16:11:20 -07:00
parent c68cedd652
commit 6ee4264a21

View File

@@ -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;