Remove default "noopener noreferrer nofollow" options

I think it should be the ability to choose rel tags. Cos for internal link building this is a bad idea. Or give the ability in field settings to add or remove these tags.
I mean fields writer / lists that use app.js

toDOM:t=>["a",{...t.attrs,rel:"noopener noreferrer nofollow"},0]}}}
3 Likes

I agree with you. All links in a writer field or in paragraph block field get attached the rel attribute without any chance to adjust them.

For blogs and magazines is this behavior not optimal. Also from SEO perspective.

In Discord a workaround appears. May this helps you. Discord

My quick and dirty solution for this issue: I created a custom field method which do a simple search and replace in the HTML.

'fieldMethods' => [
    'toBlocksCustom' => function ($field) {
        $html = $field->toBlocks()->toHtml();
        $html = str_replace('rel="noopener noreferrer nofollow"', 'rel="noopener noreferrer"', $html);
        return $html;
    }
  ]
2 Likes

yes, but I think that in the core of Kirby should be functionality to choose rel settings.

1 Like

I agree too. These hardcoded rel attribute is not optimal for many things - SEO for example. IMHO there should be a field (simple input[type=โ€œtextโ€] would be enough) where itโ€™s possible to define the rel attribute

Just ran into this issue myself. Will use a hack in the meantime, but Iโ€™ve added a feature request on the official board if anyone wants to help vote it up.