@@ -4,7 +4,7 @@ import { nicenames } from '../../actions/email-validation/caniemail-data';
44import type { CompatibilityCheckingResult } from '../../actions/email-validation/check-compatibility' ;
55import type { ImageCheckingResult } from '../../actions/email-validation/check-images' ;
66import type { LinkCheckingResult } from '../../actions/email-validation/check-links' ;
7- import { cn } from '../../utils' ;
7+ import { cn , sanitize } from '../../utils' ;
88import { getLintingSources , loadLintingRowsFrom } from '../../utils/linting' ;
99import { IconWarning } from '../icons/icon-warning' ;
1010import { Results } from './results' ;
@@ -105,7 +105,7 @@ export const Linter = ({ rows }: LinterProps) => {
105105 ) ! ;
106106 return (
107107 < Result status = { row . result . status } key = { i } >
108- < Result . Name > { failingCheck . type } </ Result . Name >
108+ < Result . Name > { sanitize ( failingCheck . type ) } </ Result . Name >
109109 < Result . Description >
110110 { failingCheck . type === 'security'
111111 ? 'Insecure URL, use HTTPS insted of HTTP'
@@ -125,7 +125,7 @@ export const Linter = ({ rows }: LinterProps) => {
125125 ? 'The link is broken due to invalid syntax'
126126 : null }
127127
128- < span className = "font-mono float-right text-ellipsis overflow-hidden text-nowrap max-w-[30ch]" >
128+ < span className = "ml-2 text-ellipsis overflow-hidden text-nowrap max-w-[30ch]" >
129129 { row . result . link }
130130 </ span >
131131 </ Result . Description >
@@ -148,10 +148,10 @@ export const Linter = ({ rows }: LinterProps) => {
148148 ) ! ;
149149 return (
150150 < Result status = { row . result . status } key = { i } >
151- < Result . Name > { failingCheck . type } </ Result . Name >
151+ < Result . Name > { sanitize ( failingCheck . type ) } </ Result . Name >
152152 < Result . Description >
153153 { failingCheck . type === 'security'
154- ? 'Insecure URL, use HTTPS insted of HTTP'
154+ ? 'Insecure URL, use HTTPS instead of HTTP'
155155 : null }
156156 { failingCheck . type === 'fetch_attempt' &&
157157 failingCheck . metadata . fetchStatusCode &&
@@ -177,7 +177,7 @@ export const Linter = ({ rows }: LinterProps) => {
177177 ? 'This image is too large, keep it under 1mb'
178178 : null }
179179
180- < span className = "font-mono float-right text-ellipsis overflow-hidden text-nowrap max-w-[30ch]" >
180+ < span className = "ml-2 text-ellipsis overflow-hidden text-nowrap max-w-[30ch]" >
181181 { row . result . source }
182182 </ span >
183183 </ Result . Description >
@@ -205,7 +205,7 @@ export const Linter = ({ rows }: LinterProps) => {
205205 return undefined ;
206206 } )
207207 . filter ( Boolean )
208- . join ( '— ' ) }
208+ . join ( ' · ' ) }
209209 </ Result . Metadata >
210210 </ Result >
211211 ) ;
@@ -228,7 +228,7 @@ export const Linter = ({ rows }: LinterProps) => {
228228
229229 return (
230230 < Result status = { row . result . status } key = { i } >
231- < Result . Name > { row . result . entry . title } </ Result . Name >
231+ < Result . Name > { sanitize ( row . result . entry . title ) } </ Result . Name >
232232 < Result . Description >
233233 { statsReportedNotWorking . length > 0
234234 ? `Not supported in ${ unsupportedClientsString } `
@@ -240,20 +240,19 @@ export const Linter = ({ rows }: LinterProps) => {
240240 { statsReportedPartiallyWorking . length > 0
241241 ? `Partially supported in ${ partiallySupportedClientsString } `
242242 : null }
243- </ Result . Description >
244- < Result . Metadata >
245- < span className = "mr-2" >
246- { row . result . location . start . line . toString ( ) . padStart ( 2 , '0' ) } :
247- { row . result . location . start . column . toString ( ) . padStart ( 2 , '0' ) }
248- </ span >
243+
249244 < a
250245 href = { row . result . entry . url }
251- className = "underline"
246+ className = "underline ml-2 decoration-slate-9 decoration-1 hover:decoration-slate-11 transition-colors hover:text-slate-12 "
252247 rel = "noreferrer"
253248 target = "_blank"
254249 >
255- See more info
250+ More ↗
256251 </ a >
252+ </ Result . Description >
253+ < Result . Metadata >
254+ { row . result . location . start . line . toString ( ) . padStart ( 2 , '0' ) } :
255+ { row . result . location . start . column . toString ( ) . padStart ( 2 , '0' ) }
257256 </ Result . Metadata >
258257 </ Result >
259258 ) ;
@@ -287,9 +286,9 @@ Result.Name = ({
287286} : React . ComponentProps < typeof Results . Column > ) => {
288287 return (
289288 < Results . Column { ...props } >
290- < span className = "flex uppercase gap-1 items-center group-data-[status=error]/result:text-red-400 group-data-[status=warning]/result:text-orange-300" >
289+ < span className = "flex uppercase gap-2 items-center group-data-[status=error]/result:text-red-400 group-data-[status=warning]/result:text-orange-300" >
291290 < IconWarning />
292- { children }
291+ { typeof children === 'string' ? sanitize ( children ) : children }
293292 </ span >
294293 </ Results . Column >
295294 ) ;
0 commit comments