I have in the scraped page an
The href would work fine as I correct the url towards an absolute one.
The problem is the onclick.
I tried to extend functions.php but it doesn't give the desired result. Any hint?
$filtered_html = preg_replace('#onclick="window.open\(\'#','onclick="my_window.open(\'XXX'.$wpwsopt['basehref'],$filtered_html);