diff --git a/CHANGELOG.md b/CHANGELOG.md index f9bc473286..0097a1ee9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ 1. [17404](https://github.com/influxdata/influxdb/pull/17404): Updated duplicate check error message to be more explicit and actionable 1. [17515](https://github.com/influxdata/influxdb/pull/17515): Editing a table cell shows the proper values and respects changes 1. [17521](https://github.com/influxdata/influxdb/pull/17521): Table view scrolling should be slightly smoother +1. [17601](https://github.com/influxdata/influxdb/pull/17601): URL table values on single columns are being correctly parsed ### UI Improvements diff --git a/ui/src/shared/components/tables/TableCell.tsx b/ui/src/shared/components/tables/TableCell.tsx index 4ed1e2dc1f..545f609dbe 100644 --- a/ui/src/shared/components/tables/TableCell.tsx +++ b/ui/src/shared/components/tables/TableCell.tsx @@ -31,12 +31,13 @@ interface Props extends CellRendererProps { timeFormatter: (time: string) => string } -const URL_REGEXP = /(https?:\/\/[^\s]+)/g +const URL_REGEXP = /((http|https)?:\/\/[^\s]+)/g // NOTE: rip this out if you spend time any here as per: // https://stackoverflow.com/questions/1500260/detect-urls-in-text-with-javascript/1500501#1500501 function asLink(str) { - if (!URL_REGEXP.test('' + str)) { + const isURL = `${str}`.includes('http://') || `${str}`.includes('https://') + if (isURL === false) { return str }