Well i'm trying to build a simple extension to achieve this... so the first step will be delete nofollow from the links.
I have this code but my problem is that removeAttributedon't works while setAttributeis working properly.
/**
* @param ConfigureFormatter $event
*/
public function configure(ConfigureFormatter $event)
{
$configurator = $event->configurator;
$dom = $configurator->tags['URL']->template->asDOM();
foreach ($dom->getElementsByTagName('a') as $a) {
$a->removeAttribute('target');
$a->removeAttribute('rel');
$a->setAttribute('testing', 'temp');
}
Not sure if i'm doing something in thw wrong way... or if i'm missing something. Can anyone help me?
In my brain something tells me that the atributes can't be removed because maybe they didn't already added... mmm...