From dab68de1f0868d3a1fc7fb6645f59519b66d7f8a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 27 Sep 2013 14:17:16 +0000 Subject: [PATCH] Fix pasting html into EditableContent --- source/Ox.UI/js/Form/EditableContent.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Ox.UI/js/Form/EditableContent.js b/source/Ox.UI/js/Form/EditableContent.js index 9036bf9a..35d867bd 100644 --- a/source/Ox.UI/js/Form/EditableContent.js +++ b/source/Ox.UI/js/Form/EditableContent.js @@ -91,6 +91,8 @@ Ox.EditableContent = function(options, self) { if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData) { Ox.print('TYPES', e.originalEvent.clipboardData.types); var value = e.originalEvent.clipboardData.getData('text/plain'); + value = Ox.encodeHTMLEntities(value).replace('\n', '
\n'); + Ox.print('VALUE', value); document.execCommand('insertHTML', false, value); e.originalEvent.stopPropagation(); e.originalEvent.preventDefault();