File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ function TimeEntry(props) {
114114 editFilteredColor ( ) ;
115115 } , [ ] ) ;
116116
117+ const hasHtmlTags =
118+ typeof notes === 'string' && / < \/ ? [ a - z ] [ \s \S ] * > / i. test ( notes ) ;
119+
117120 return (
118121 < div style = { { display : 'flex' } } >
119122 < div
@@ -177,9 +180,12 @@ function TimeEntry(props) {
177180 < Col md = { 5 } className = "pl-2 pr-0" >
178181 < div className = "time-entry-container" >
179182 < div className = { `notes-section ${ darkMode ? 'notes-text-light' : '' } ` } >
180- < div className = { darkMode ? "dark-text-muted" : "text-muted" } > Notes:</ div >
181- { parse ( notes ) }
182- </ div >
183+ < div className = { darkMode ? 'dark-text-muted' : 'text-muted' } > Notes:</ div >
184+
185+ { hasHtmlTags
186+ ? parse ( notes )
187+ : < span > { notes != null ? String ( notes ) : '' } </ span > }
188+ </ div >
183189 < div className = "d-flex justify-content-end" >
184190 { ( hasATimeEntryEditPermission || isAuthUserAndSameDayEntry ) &&
185191 ! cantEditJaeRelatedRecord && (
You can’t perform that action at this time.
0 commit comments