[PR #2180] [MERGED] Always open links in chat in a new tab #7714

Closed
opened 2025-11-11 17:34:02 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/2180
Author: @austenadler
Created: 5/11/2024
Status: Merged
Merged: 5/26/2024
Merged by: @tjbck

Base: devHead: dev


📝 Commits (2)

  • 3a1fbb9 Always open links in a new tab
  • c979999 Also replace > with >

📊 Changes

2 files changed (+11 additions, -1 deletions)

View changed files

📝 src/lib/components/chat/Messages/ResponseMessage.svelte (+7 -0)
📝 src/lib/utils/index.ts (+4 -1)

📄 Description

Pull Request Checklist

  • Target branch: Pull requests should target the dev branch.
  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for the changes? -> I did not see any tests
  • Code Review: Have you self-reviewed your code and addressed any coding standard issues?

Description

Add target="_blank" rel="nofollow" to all links in the chat history window. It is annoying to click a link in a chat and have it unload Open-Webui, so I added this feature. (This)[https://github.com/markedjs/marked/issues/655#issuecomment-383226346] issue in the marked repo describes how to do this properly.

This only applies to links within chat messages. For example, asking a model what is the URL of https://google.com? and clicking the link in your message or the one it produces.


Changelog Entry

Changed

  • Links in chat open in a new tab instead of the same tab


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/2180 **Author:** [@austenadler](https://github.com/austenadler) **Created:** 5/11/2024 **Status:** ✅ Merged **Merged:** 5/26/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (2) - [`3a1fbb9`](https://github.com/open-webui/open-webui/commit/3a1fbb936b1f7d073f6762edaa036ac42722c2e7) Always open links in a new tab - [`c979999`](https://github.com/open-webui/open-webui/commit/c9799991f2e52cd3b2e331c52114007608244807) Also replace > with &gt; ### 📊 Changes **2 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/ResponseMessage.svelte` (+7 -0) 📝 `src/lib/utils/index.ts` (+4 -1) </details> ### 📄 Description ## Pull Request Checklist - [x] **Target branch:** Pull requests should target the `dev` branch. - [x] **Description:** Briefly describe the changes in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests for the changes? -> I did not see any tests - [x] **Code Review:** Have you self-reviewed your code and addressed any coding standard issues? --- ## Description Add `target="_blank" rel="nofollow"` to all links in the chat history window. It is annoying to click a link in a chat and have it unload Open-Webui, so I added this feature. (This)[https://github.com/markedjs/marked/issues/655#issuecomment-383226346] issue in the `marked` repo describes how to do this properly. This only applies to links within chat messages. For example, asking a model `what is the URL of https://google.com?` and clicking the link in your message or the one it produces. --- ### Changelog Entry ### Changed - Links in chat open in a new tab instead of the same tab --- --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:34:02 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#7714