Opened 14 years ago

Closed 14 years ago

#590 closed defect (invalid)

multiple editors on same page make the plugin getHtml fail

Reported by: mokhet Owned by: gogo
Priority: normal Milestone:
Component: Plugin_Other Version:
Severity: normal Keywords:
Cc:

Description

When i have multiple editors on the same page and at least 2 of them using the plugin getHTML, it fails to show the source with the message : Too much recursion

//override (hack) outwardHtml() to handle onclick suppression
HTMLArea.prototype._origOutwardHtml = HTMLArea.prototype.outwardHtml;
HTMLArea.prototype.outwardHtml = function(html) {
	html = html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open(");
	html = html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open(");
	this._origOutwardHtml(html); // <--- TOO MUCH RECURSION HERE
	return html;
};

Change History (5)

comment:1 Changed 14 years ago by wymsy

Can you describe the problem more fully? I have been unable to reproduce it either on my implementation of xinha or in the example. What browser/OS are you using, and what plugins?

comment:2 Changed 14 years ago by mokhet

http://hebdo-des-notes.com/test_gethtml.html

there is 3 xinha editors on this page, they all are using the plugin GetHtml? between others. When I click on the "show source" icon in any of them the bug occurs at the line :
this._origOutwardHtml(html);

FF1.5rc2 / linux (slackware) = too much recursion
FF1.0.7/ linux (slackware) = too much recursion
FF1.5rc2 / Win2K = too much recursion
FF1.0.4 / Win2K = too much recursion
IE6 / Win2K = stack overflow
mozilla 1.7.3 / Win2K = too much recursion

changeset used is changeset:423

When i set the GetHtml? plugin to only one of the editors (or none), "show source" is working back.

comment:3 Changed 14 years ago by gocher

Hello mokhet,

i looked at the source of that page, why did you load Plugins more than one time?

HTMLArea.loadPlugin("CharacterMap");
HTMLArea.loadPlugin("FindReplace");
HTMLArea.loadPlugin("CharCounter");
HTMLArea.loadPlugin("SpellChecker");
HTMLArea.loadPlugin("GetHtml");
HTMLArea.loadPlugin("CharacterMap");
HTMLArea.loadPlugin("ListType");
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("InsertAnchor");
HTMLArea.loadPlugin("FindReplace");
HTMLArea.loadPlugin("SpellChecker");
HTMLArea.loadPlugin("ImageManager");
HTMLArea.loadPlugin("Linker");
HTMLArea.loadPlugin("GetHtml");
HTMLArea.loadPlugin("CharacterMap");
HTMLArea.loadPlugin("FindReplace");
HTMLArea.loadPlugin("CharCounter");
HTMLArea.loadPlugin("SpellChecker");
HTMLArea.loadPlugin("GetHtml");

comment:4 Changed 14 years ago by mokhet

God i hate me. I spend 1 full week trying to find what was the problem before submiting the ticket :( I was really thinking it was GetHtml? related when in fact it was a bug in my php wrapper :( how the hell could i be so wrong after so much time investigate on the bug.

Sorry for the noise, really sorry. Hate myself, fixing my php wrapper make the problem disappear.

comment:5 Changed 14 years ago by mokhet

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.