File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
source/views/sis/student-work Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11// @flow
22import type { JobType } from './types'
33
4- import { fastGetTrimmedText } from '../../../lib/html'
4+ import {
5+ fastGetTrimmedText ,
6+ removeHtmlWithRegex ,
7+ } from '../../../lib/html'
58
69export function cleanJob ( job : JobType ) : JobType {
710 const title = fastGetTrimmedText ( job . title )
8- const description = fastGetTrimmedText ( job . description )
911 const office = fastGetTrimmedText ( job . office )
1012 const type = fastGetTrimmedText ( job . type )
11- const comments = fastGetTrimmedText ( job . comments )
12- const skills = fastGetTrimmedText ( job . skills )
13+
14+ // these all need to retain their newlines
15+ const description = removeHtmlWithRegex ( job . description ) . replace ( '\t' , ' ' )
16+ const comments = removeHtmlWithRegex ( job . comments ) . replace ( '\t' , ' ' )
17+ const skills = removeHtmlWithRegex ( job . skills ) . replace ( '\t' , ' ' )
1318
1419 const hoursPerWeek = job . hoursPerWeek . trim ( )
1520 const lastModified = job . lastModified . trim ( )
You can’t perform that action at this time.
0 commit comments