Answers.Body: <p>And this solved the problem:</p>
  
  <p><code>"Attr.AllowedFrameTargets": ["_blank"]</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-22T11:28:56.863Z
Answers.LastActivityDate: 2019-02-22T11:28:56.863Z
Answers.UserDisplayName: Ryan Roberts
Body: <p>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).</p>
  
  <pre><code>{
    "HTML.ForbiddenElements": ["&amp;nbsp;", "br"],
    "AutoFormat.RemoveEmpty.RemoveNbsp": true,
    "AutoFormat.RemoveEmpty": true,
    "AutoFormat.Linkify": true,
    "AutoFormat.RemoveSpansWithoutAttributes": true
  }
  </code></pre>
  
  <p>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).</p>
  
  <p>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?</p>
  
Tags: <templating><craft3><redactor><output>
Title: Can I have non-boolean TargetBlank output using HTMLPurifier and the Redactor plugin?
ThreadText: # Can I have non-boolean TargetBlank output using HTMLPurifier and the Redactor plugin?
  
  (Asked by: username_0 on 2019-02-22)
  
  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": ["&nbsp;", "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?
  
  **Tags:** templating, craft3, redactor, output
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-02-22. Score: 1
  
  And this solved the problem:
  
  `"Attr.AllowedFrameTargets": ["_blank"]`
  
  
  ---
  
  