I'm using the Redactor plugin throughout a Craft 3 site and I'm also using a custom HTML Purifier config to clean up the HTML (surprise).

  "HTML.ForbiddenElements": [" ", "br"],
  "AutoFormat.RemoveEmpty.RemoveNbsp": true,
  "AutoFormat.RemoveEmpty": true,
  "AutoFormat.Linkify": true,
  "AutoFormat.RemoveSpansWithoutAttributes": true

However it looks like it overrides Redactor's link target blank option and that override is either on (open in new tabs) or off (strip target blank).

Is there any way I can give that choice back to the user? Maybe I can stop Craft using the full url for links other than external links?


And this solved the problem:

"Attr.AllowedFrameTargets": ["_blank"]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.