Issue #634: fix HTML in message dialog text containing URLs with trailing double quote

This commit is contained in:
Ansgar Becker
2024-05-30 18:43:57 +02:00
parent 2aa65f1af5
commit abc0900f69

View File

@ -2393,7 +2393,7 @@ begin
if Assigned(MainForm) and (MainForm.ActiveConnection <> nil) then
Dialog.Caption := MainForm.ActiveConnection.Parameters.SessionName + ': ' + Dialog.Caption;
rx := TRegExpr.Create;
rx.Expression := 'https?://\S+';
rx.Expression := 'https?://[^\s"]+';
Dialog.Text := rx.Replace(Msg, '<a href="$0">$0</a>', True);
rx.Free;