File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -187,3 +187,11 @@ export const normalizeGitHubCommitUrl = url => {
187187 . replace ( '/repos' , '' )
188188 . replace ( 'commits' , 'commit' )
189189}
190+
191+ export const decodeHtmlEntities = str =>
192+ str
193+ ?. replace ( / & l t ; / g, '<' )
194+ . replace ( / & g t ; / g, '>' )
195+ . replace ( / & q u o t ; / g, '"' )
196+ . replace ( / & # 3 9 ; / g, "'" )
197+ . replace ( / & a m p ; / g, '&' )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Icon from '../../components/icon'
99import Image from 'next/image'
1010import zephyrPic from '../../public/jobs/zephyr-group-pic.jpg'
1111import { compact } from 'lodash'
12+ import { decodeHtmlEntities } from '../../lib/helpers'
1213
1314const JobListing = ( {
1415 positionName,
@@ -156,7 +157,7 @@ const Page = ({ jobs }) => (
156157 jobs . items . map ( job => (
157158 < JobListing
158159 key = { job . id }
159- positionName = { job . title }
160+ positionName = { decodeHtmlEntities ( job . title ) }
160161 positionDesc = { job . job_category_name }
161162 positionLink = { job . job_post_url }
162163 positionLocation = { job . display_location }
You can’t perform that action at this time.
0 commit comments