Merged in bugfix/mailto_emptyspace (pull request #229)

fixed mailto url scheme according to rfc2368
This commit is contained in:
Rene Pfeuffer
2019-04-10 08:50:36 +00:00
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}
/>
</>
</>
);
}
}

View File

@@ -20,7 +20,7 @@ export default class UserRow extends React.Component<Props> {
<td className="is-hidden-mobile">{this.renderLink(to, user.name)}</td>
<td>{this.renderLink(to, user.displayName)}</td>
<td>
<a href={`mailto: ${user.mail}`}>{user.mail}</a>
<a href={`mailto:${user.mail}`}>{user.mail}</a>
</td>
<td className="is-hidden-mobile">
<input type="checkbox" id="active" checked={user.active} readOnly />