import * as React from 'react';
import truncate from 'truncate-url';

const Link = ({ text, href, ...props }) => (
  <a href={href} title={href} target="_blank" {...props}>
    {truncate(text, 60)}
  </a>
);

Link.propTypes = {
  text: React.PropTypes.string.isRequired,
  href: React.PropTypes.string.isRequired
};

export default Link;

@@ -112,16 +112,20 @@
 %3E (%0A  %3Ca
+%0A   
  href=%7Bh
@@ -128,16 +128,20 @@
 f=%7Bhref%7D
+%0A   
  title=%7B
@@ -145,16 +145,20 @@
 e=%7Bhref%7D
+%0A   
  target=
@@ -165,16 +165,41 @@
 %22_blank%22
+%0A    rel=%22noreferrer%22%0A   
  %7B...pro
@@ -201,16 +201,19 @@
 ..props%7D
+%0A  
 %3E%0A    %7Bt

add rel=noreferrer to links, closes #182