fixed mailto url scheme according to rfc2368

This commit is contained in:
Florian Scholdei
2019-04-05 14:44:33 +02:00
parent dcf6dfffcf
commit 848075050c
3 changed files with 9 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ class MailLink extends React.Component<Props> {
if (!address) {
return null;
}
return <a href={"mailto: " + address}>{address}</a>;
return <a href={"mailto:" + address}>{address}</a>;
}
}

View File

@@ -2,13 +2,13 @@
import React from "react";
import type { Changeset } from "@scm-manager/ui-types";
import { ExtensionPoint } from "@scm-manager/ui-extensions";
import {translate} from "react-i18next";
import { translate } from "react-i18next";
type Props = {
changeset: Changeset,
// context props
t: (string) => string
t: string => string
};
class ChangesetAuthor extends React.Component<Props> {
@@ -28,7 +28,10 @@ class ChangesetAuthor extends React.Component<Props> {
renderWithMail(name: string, mail: string) {
const { t } = this.props;
return (
<a href={"mailto: " + mail} title={t("changeset.author.mailto") + " " + mail}>
<a
href={"mailto:" + mail}
title={t("changeset.author.mailto") + " " + mail}
>
{name}
</a>
);
@@ -44,7 +47,7 @@ class ChangesetAuthor extends React.Component<Props> {
props={{ changeset: this.props.changeset }}
renderAll={true}
/>
</>
</>
);
}
}