My fix for Buttons and Links is here. Line 297
$i = 0;
foreach ($arrSearch as $search) {
$start = 0;
while ($pos = strpos($article->text, $search, $start)) {
for ($j = 0; $j<=300; $j++) { // Seek for Links
if (substr($article->text, $pos-$j, 2) == '<a'
|| substr($article->text, $pos-$j, 7) == '<button') {
$link_found = true;
break;
} elseif (substr($article->text, $pos-$j, 2) == '<p') {
$link_found = false;
break;
}
}
if ($link_found) {
$link_found = false;
$start = $pos + strlen($search);
} else {
$article->text = substr($article->text,0,$pos) .
$arrReplace[$i] .
substr($article->text,$pos+strlen($search),65555);
$start = $pos + strlen($arrReplace[$i]);
}
}
$i++;
}
// try to solve the replacement within replacement problem with the stro_replace functions
// ^ Replacement for:
//$article->text = $this->stro_replace1($arrSearch, $arrReplace, $article->text);