summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fckeditor.utils.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/fckeditor.utils.js b/fckeditor.utils.js
index 64dd961..0715775 100644
--- a/fckeditor.utils.js
+++ b/fckeditor.utils.js
@@ -103,9 +103,16 @@ function CreateToggle(elId, jsId, fckeditorOn)
}
function doFCKeditorSave(){
+ var text;
for ( var i = 0 ; i < fckLaunchedJsId.length ; i++ ) {
- if ( document.getElementById( fckLaunchedTextareaId[i] ).style.display == 'none' )
- document.getElementById( fckLaunchedTextareaId[i] ).value = FCKeditorAPI.GetInstance( fckLaunchedJsId[i] ).GetXHTML(true);
+ if ( document.getElementById( fckLaunchedTextareaId[i] ).style.display == 'none' ) {
+ text = FCKeditorAPI.GetInstance( fckLaunchedJsId[i] ).GetXHTML(true);
+ // #372150 and #374386
+ if (text == '<br />' || text == '<p>&#160;</p>' || text == '<div>&#160;</div>') {
+ text = '';
+ }
+ document.getElementById( fckLaunchedTextareaId[i] ).value = text;
+ }
}
return true; //continue submitting
}