fixed a couple more rich editor problems

This commit is contained in:
JT Smith 2005-08-05 22:56:44 +00:00
parent 8a5c997441
commit d8a04921e4
3 changed files with 13 additions and 14 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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;
}