fixed infinit loop, if string to active starts with url right away, eg. "https://domain.com/"

This commit is contained in:
Ralf Becker 2014-06-03 07:22:34 +00:00
parent 3b8bee4d18
commit c6fe901b56

View File

@ -495,10 +495,11 @@ function et2_activateLinks(_content)
var splitted = _content.split(_matches[0]);
// Push the not-matched part
if (splitted[0])
var left = splitted.shift();
if (left)
{
// activate the links of the left string
arr = arr.concat(et2_activateLinks(splitted.shift()));
arr = arr.concat(et2_activateLinks(left));
}
// Call the callback function which converts the matches into an object