diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 035dbf786..814aa8533 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -5,6 +5,7 @@ - Rich editor defaultly does not validate HTML tags and therefore will allow the slop that it was stripping out before. While less strict, this is less confusing to end users. + - The Rich Editor no longer second guesses the URL that a user enters. - Being in the admins group automatically results in a UI level capable of seeing everything. - fix [ 1251390 ] Security tab doesn't appear for member of Admins diff --git a/lib/WebGUI/Asset/RichEdit.pm b/lib/WebGUI/Asset/RichEdit.pm index cc7ffb169..c88508e32 100644 --- a/lib/WebGUI/Asset/RichEdit.pm +++ b/lib/WebGUI/Asset/RichEdit.pm @@ -453,11 +453,10 @@ sub getRichEditor { push(@plugins,"insertImage") if ($button eq "insertImage"); push(@plugins,"collateral") if ($button eq "collateral"); push(@plugins,"pagetree") if ($button eq "pagetree"); - push(@plugins,"") if ($button eq ""); - push(@plugins,"") if ($button eq ""); - push(@plugins,"") if ($button eq ""); - push(@plugins,"") if ($button eq ""); - push(@plugins,"") if ($button eq ""); + if ($button eq "code") { + $config{theme_advanced_source_editor_width} = $self->getValue("sourceEditorWidth") if ($self->getValue("sourceEditorWidth") > 0); + $config{theme_advanced_source_editor_height} = $self->getValue("sourceEditorHeight") if ($self->getValue("sourceEditorHeight") > 0); + } } my $language = WebGUI::International::getLanguage($session{user}{language},"languageAbbreviation"); unless ($language) { @@ -467,8 +466,6 @@ sub getRichEditor { $config{content_css} = $self->getValue("cssFile") if ($self->getValue("cssFile") ne ""); $config{width} = $self->getValue("editorWidth") if ($self->getValue("editorWidth") > 0); $config{height} = $self->getValue("editorHeight") if ($self->getValue("editorHeight") > 0); - $config{theme_advanced_source_editor_width} = $self->getValue("sourceEditorWidth") if ($self->getValue("sourceEditorWidth") > 0); - $config{theme_advanced_source_editor_height} = $self->getValue("sourceEditorHeight") if ($self->getValue("sourceEditorHeight") > 0); $config{plugins} = join(",",@plugins); my @directives; foreach my $key (keys %config) { diff --git a/www/extras/tinymce/jscripts/webgui.js b/www/extras/tinymce/jscripts/webgui.js index 2291a2a02..96b909044 100644 --- a/www/extras/tinymce/jscripts/webgui.js +++ b/www/extras/tinymce/jscripts/webgui.js @@ -1,11 +1,8 @@ // WebGUI Specific javascript functions for TinyMCE function tinyMCE_WebGUI_URLConvertor(url, node, on_save) { - // Use default URL convertor, old 1.43 else 1.44+ - if (typeof(TinyMCE_convertURL) != "undefined") - url = TinyMCE_convertURL(url, node, on_save); - else - url = tinyMCE.convertURL(url, node, on_save); + // The next line would have tried formatting the URL, but we don't want it to + //url = tinyMCE.convertURL(url, node, on_save); // Do custom WebUI convertion, replace back ^(); url = url.replace(new RegExp("%5E", "g"), "^"); url = url.replace(new RegExp("%3B", "g"), ";"); @@ -15,7 +12,11 @@ function tinyMCE_WebGUI_URLConvertor(url, node, on_save) { return url; } -function tinyMCE_WebGUI_Cleanup(type,content) { - return content.replace(new RegExp(""","g"),'"'); +function tinyMCE_WebGUI_Cleanup(type,value) { +// alert(value); + if (value != "[object HTMLBodyElement]") { + value = value.replace(new RegExp(""", "g"),"\""); + } + return value; }