Try our conversational search powered by Generative AI!

Automatically add rel="noopener" to target="_blank" in new TinyMCE editor


Hi All 

Anyone have hints hot to add rel="noopener to all new links created that have target="_blank" in the XHtmlstring with TinyMCE? 

thanks for any input 

Edited, Oct 05, 2018 11:37

my thought is that i have to hook on epi-link somehow.. 


or maybe we can add something in the TinyMCEInitializer... example,  .AddSettingsTransform but im not quite sure what to do.. 

Oct 05, 2018 15:26

I would put it in one of the server side events (OnContentSaving or similiar) or if you already have masses of pages; when rendering.

Oct 06, 2018 7:45

@Goaral: which version of EPiServer TinyMCE are you using? I think you should not get that issue from EPiServer TinyMCE 2.0

Oct 09, 2018 12:53

Had to do something similar a while ago, although in our case we couldn't keep it specific to the Episerver/TinyMCE rendering as the client had hardcoded links in their FE that they also wanted all updated in one sweep (and not having to worry about it in the future is a bonus).

First I did it with an Attribute Filter on the base page controller which worked, but the way they have custom cookies meant it didn't work that well with A/B Testing, so v2 of the implementation uses an HTTP Module.

You can find the full info here (as well as code samples):


Oct 11, 2018 13:18
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.