diff --git a/assets/components/LogViewer/LogItem.vue b/assets/components/LogViewer/LogItem.vue index 781de69b..aab49111 100644 --- a/assets/components/LogViewer/LogItem.vue +++ b/assets/components/LogViewer/LogItem.vue @@ -26,8 +26,3 @@ const { hosts } = useHosts(); const container = currentContainer(toRef(() => logEntry.containerID)); const host = computed(() => hosts.value[container.value.host]); - diff --git a/assets/components/LogViewer/SimpleLogItem.vue b/assets/components/LogViewer/SimpleLogItem.vue index a7e19c6c..8dc3c22c 100644 --- a/assets/components/LogViewer/SimpleLogItem.vue +++ b/assets/components/LogViewer/SimpleLogItem.vue @@ -28,7 +28,14 @@ defineProps<{ }>(); const colorize = (value: string) => ansiConvertor.toHtml(value); -const urlPattern = /(https?:\/\/[^\s]+)/g; +const urlPattern = + /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b[-a-zA-Z0-9()@:%_+.~#?&\/=]*/g; const linkify = (text: string) => text.replace(urlPattern, (url) => `${url}`); + + diff --git a/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap b/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap index 4afebbac..5dfbd404 100644 --- a/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap +++ b/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap @@ -3,16 +3,16 @@ exports[` > render html correctly > should render dates with 12 hour style 1`] = ` "