Skip to content

Commit

Permalink
Revert a part of commit 976dd6b: do not generate hyperlinks for local…
Browse files Browse the repository at this point in the history
… file paths, which get broken too often due to unsupported spaces.
  • Loading branch information
ansgarbecker committed Jan 1, 2022
1 parent d7d2993 commit 210f056
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/apphelpers.pas
Expand Up @@ -2307,10 +2307,7 @@ function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons:
if Assigned(MainForm) and (MainForm.ActiveConnection <> nil) then
Dialog.Caption := MainForm.ActiveConnection.Parameters.SessionName + ': ' + Dialog.Caption;
rx := TRegExpr.Create;
// This expression does not correctly detect filenames with all allowed characters, for which we would
// need to take TPath.GetInvalidPathChars into account. But to not excessively eat parts of the following
// text, we stop at the first space character
rx.Expression := '(https?://|[A-Z]\:\\)\S+';
rx.Expression := 'https?://\S+';
Dialog.Text := rx.Replace(Msg, '<a href="$0">$0</a>', True);
rx.Free;

Expand Down

0 comments on commit 210f056

Please sign in to comment.