jQueryPlugins icon indicating copy to clipboard operation
jQueryPlugins copied to clipboard

No way to remove javascript code.

Open hxyman opened this issue 13 years ago • 0 comments

<div onmouseover="dosomething()"</div>
...
</div>

Because the js code(onmouseover) is not removed, resulting in an error.

fix:
jquery.printElement.min.js

Append a line after line:139
var elementHtml = $('<div></div>').append($element.clone()).html();

elementHtml = elementHtml.replace(/ on(load|unload|click|dblclick|mouse|focus|blur|submit|reset|select|change)/gi,' on');

//Event reference: http://www.w3.org/TR/html4/interact/scripts.html 

hxyman avatar Dec 22 '11 14:12 hxyman