[ic] Bug in htmlarea.widget in ic 5.3.2
Stefan Hornburg
racke at linuxia.de
Sat Nov 26 05:06:29 EST 2005
Bas Bezemer wrote:
> Hi IC 5.3.2 developers,
>
> Upgrading from 5.2.1 to 5.3.2 i came into trouble with the htmlarea
> widget that comes with 532. At least in the latest firefox it will not
> appear and shows the following error in de javascript console:
> Error: class is a reserved identifier
> Source File:
> http://192.168.1.3/cgi-bin/pv/admin/text/text_edit.html?item_id=00431&id=gPkyV2D3&mv_pc=3188
>
> Line: 557, Column: 38
> Source Code:
> HTMLArea.replace('htmlarea_content', class="s3");
>
> Probably the second argument 'class="s3"' isn't quoted properly.
>
> If i use the following htmlarea.widget the rich html editor works fine:
> http://cvs.icdevgroup.org/cgi-bin/cvsweb/~checkout~/interchange/code/Widget/htmlarea.widget?rev=1.1&content-type=text/plain
This patch fixes the problem by renaming the "extra" option to "htmlarea_config".
--- htmlarea.widget 11 Sep 2005 23:46:39 -0000 1.6
+++ htmlarea.widget 26 Nov 2005 10:02:25 -0000 1.6.2.1
@@ -110,10 +110,10 @@
my $pre_scr = '';
my $post_scr = '';
my $onmouse = '';
- my $extra = '';
+ my $htmlarea_config = '';
- if ($opt->{extra}) {
- $extra = ", $opt->{extra}";
+ if ($opt->{htmlarea_config}) {
+ $htmlarea_config = ", $opt->{htmlarea_config}";
}
if($Session->{browser} =~ /MSIE/) {
@@ -122,12 +122,12 @@
var htmlarea_needinit_$pname = true;
</script>
};
- $onmouse = qq{ onMouseOver="if(htmlarea_needinit_$pname) {
HTMLArea.replace('htmlarea_$pname'$extra); htmlarea_needinit_$pname=false }"};
+ $onmouse = qq{ onMouseOver="if(htmlarea_needinit_$pname) {
HTMLArea.replace('htmlarea_$pname'$htmlarea_config); htmlarea_needinit_$pname=false }"};
}
else {
$post_scr = <<EOF;
<script>
- HTMLArea.replace('htmlarea_$pname'$extra);
+ HTMLArea.replace('htmlarea_$pname'$htmlarea_config);
</script>
EOF
}
Thanks for the report !
Racke
More information about the interchange-users
mailing list