[Rt-commit] r13080 - in rt/branches/3.8-TESTING: share/html/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Mon Jun 9 17:14:55 EDT 2008
Author: sartak
Date: Mon Jun 9 17:14:54 2008
New Revision: 13080
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/share/html/Elements/HeaderJavascript
Log:
r61905 at onn: sartak | 2008-06-09 17:14:35 -0400
Don't encode any textarea multiple times with FCKeditor
Modified: rt/branches/3.8-TESTING/share/html/Elements/HeaderJavascript
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/HeaderJavascript (original)
+++ rt/branches/3.8-TESTING/share/html/Elements/HeaderJavascript Mon Jun 9 17:14:54 2008
@@ -77,8 +77,8 @@
|| (textArea.getAttribute('className') == 'messagebox')) {
// Turn the original plain text content into HTML
-%# Special case - When continuing an edit session with attachment, keep the HTMLified content.
-% if (!$m->request_args->{'AddMoreAttach'} && !$m->request_args->{'UpdatePreview'}) {
+%# Special case - when we re-edit a textarea, don't re-encode it
+% if (!$m->request_args->{'FCKeditorEncoded'}) {
textArea.value = textArea.value.replace(
/&/g, "&"
).replace(
@@ -90,6 +90,14 @@
);
% }
+%# for this template..
+ var FCKeditorEncoded = document.createElement('input');
+ FCKeditorEncoded.setAttribute('type', 'hidden');
+ FCKeditorEncoded.setAttribute('name', 'FCKeditorEncoded');
+ FCKeditorEncoded.setAttribute('value', '1');
+ textArea.parentNode.appendChild(FCKeditorEncoded);
+
+%# for FCKeditor..
var typeField = document.createElement('input');
typeField.setAttribute('type', 'hidden');
typeField.setAttribute('name', textArea.name + 'Type');
More information about the Rt-commit
mailing list