diff --git a/common/app/routes/Jobs/components/ShowJob.jsx b/common/app/routes/Jobs/components/ShowJob.jsx index d7076f0a5e..658a8f6295 100644 --- a/common/app/routes/Jobs/components/ShowJob.jsx +++ b/common/app/routes/Jobs/components/ShowJob.jsx @@ -1,6 +1,8 @@ import React, { PropTypes } from 'react'; import { Well, Row, Col, Thumbnail, Panel } from 'react-bootstrap'; +import urlRegexFactory from 'url-regex'; +const urlRegex = urlRegexFactory(); const defaultImage = 'https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png'; @@ -10,6 +12,12 @@ const thumbnailStyle = { maxWidth: '100px' }; +function addATags(text) { + return text.replace(urlRegex, function(match) { + return `${match}`; + }); +} + export default React.createClass({ displayName: 'ShowJob', propTypes: { @@ -90,10 +98,12 @@ export default React.createClass({