Ticket #696 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

patch: fix variable scope leak in HTMLArea.getInnerHTML()

Reported by: tloo@… Owned by: gogo
Priority: high Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords:
Cc:

Description

the function HTMLArea.getInnerHTML() (rev 461) is missing a local variable declaration causing a namespace clash with the [window] object, resulting in an error in MSIE. This simple inlined patch fixes that:

--- htmlarea.js.orig	2006-03-03 14:42:56.000000000 +0100
+++ htmlarea.js	2006-03-03 14:46:08.000000000 +0100
@@ -4397,6 +4397,7 @@
 // retrieve the HTML (fastest version, but uses innerHTML)
 HTMLArea.prototype.getInnerHTML = function() {
   if(!this._doc.body) return '';
+  var html = "";
   switch (this._editMode) {
       case "wysiwyg"  :
         if (!this.config.fullPage)

Attachments

get_inner_html-variable-leak.patch (381 bytes) - added by tloo@… 7 years ago.

Change History

Changed 7 years ago by tloo@…

Changed 7 years ago by gocher

  • status changed from new to closed
  • resolution set to fixed

fixed at revision 470

Note: See TracTickets for help on using tickets.