[GH-ISSUE #12641] feat: Support target="_blank" for external links #55330

Closed
opened 2026-05-05 17:27:15 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @shibinmatrix on GitHub (Apr 9, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12641

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Description

Currently, Open WebUI v0.6.1 strips out the target="_blank" attribute from HTML links, preventing external links from opening in new tabs. This is a common UX requirement, especially for documentation and reference links.

Use Cases

  1. Documentation references
  2. External resource links
  3. Maintaining user context while accessing external content

Security Considerations

  • Can be implemented safely with proper sanitization rules
  • Should maintain existing XSS protections
  • Can be combined with CSP headers

Additional Context

This feature would align with web accessibility guidelines and common web development practices.

Desired Solution you'd like

Current Behavior

  • HTML target="_blank" attribute is stripped during rendering
  • External links open in the same tab, disrupting the user's workflow
  • Various workarounds (markdown syntax, JavaScript handlers) are also sanitized

Requested Behavior

  • Support target="_blank" attribute for external links
  • Allow users to configure whether external links should open in new tabs
  • Maintain security through existing rel="noopener noreferrer" attributes

Alternatives Considered

Various workarounds (markdown syntax, JavaScript handlers) are also sanitized

Additional Context

No response

Originally created by @shibinmatrix on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12641 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description ## Description Currently, Open WebUI v0.6.1 strips out the `target="_blank"` attribute from HTML links, preventing external links from opening in new tabs. This is a common UX requirement, especially for documentation and reference links. ## Use Cases 1. Documentation references 2. External resource links 3. Maintaining user context while accessing external content ## Security Considerations - Can be implemented safely with proper sanitization rules - Should maintain existing XSS protections - Can be combined with CSP headers ## Additional Context This feature would align with web accessibility guidelines and common web development practices. ### Desired Solution you'd like ## Current Behavior - HTML `target="_blank"` attribute is stripped during rendering - External links open in the same tab, disrupting the user's workflow - Various workarounds (markdown syntax, JavaScript handlers) are also sanitized ## Requested Behavior - Support `target="_blank"` attribute for external links - Allow users to configure whether external links should open in new tabs - Maintain security through existing `rel="noopener noreferrer"` attributes ### Alternatives Considered Various workarounds (markdown syntax, JavaScript handlers) are also sanitized ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#55330