balazs-endresz / jquery-translate

Automatically exported from code.google.com/p/jquery-translate
5 stars 5 forks source link

Infinite loop when translating certain html #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
jquery-translate version: trunk (it says "null" in the file comment)
jQuery version: 1.7.1
browser: Chromium 17 / Firefox 10
OS: Ubuntu 11.10

This is a very unusual and hazardous bug.

I have the following html:

<div id="test">
  <span class="translated">vaca sagrada!</span>
</div>

When i execute the following code, the plugin goes into an infinite loop:

function some_code() {
  var tmp = $("#test");
  $(tmp.find("span.translated")).translate("en");
}

I'm using bing to translate.

Original issue reported on code.google.com by DarthPo...@gmail.com on 2 Mar 2012 at 9:05