@@ -4,7 +4,7 @@ import { nicenames } from '../../actions/email-validation/caniemail-data';
4
4
import type { CompatibilityCheckingResult } from '../../actions/email-validation/check-compatibility' ;
5
5
import type { ImageCheckingResult } from '../../actions/email-validation/check-images' ;
6
6
import type { LinkCheckingResult } from '../../actions/email-validation/check-links' ;
7
- import { cn } from '../../utils' ;
7
+ import { cn , sanitize } from '../../utils' ;
8
8
import { getLintingSources , loadLintingRowsFrom } from '../../utils/linting' ;
9
9
import { IconWarning } from '../icons/icon-warning' ;
10
10
import { Results } from './results' ;
@@ -105,7 +105,7 @@ export const Linter = ({ rows }: LinterProps) => {
105
105
) ! ;
106
106
return (
107
107
< Result status = { row . result . status } key = { i } >
108
- < Result . Name > { failingCheck . type } </ Result . Name >
108
+ < Result . Name > { sanitize ( failingCheck . type ) } </ Result . Name >
109
109
< Result . Description >
110
110
{ failingCheck . type === 'security'
111
111
? 'Insecure URL, use HTTPS insted of HTTP'
@@ -125,7 +125,7 @@ export const Linter = ({ rows }: LinterProps) => {
125
125
? 'The link is broken due to invalid syntax'
126
126
: null }
127
127
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]" >
129
129
{ row . result . link }
130
130
</ span >
131
131
</ Result . Description >
@@ -148,10 +148,10 @@ export const Linter = ({ rows }: LinterProps) => {
148
148
) ! ;
149
149
return (
150
150
< Result status = { row . result . status } key = { i } >
151
- < Result . Name > { failingCheck . type } </ Result . Name >
151
+ < Result . Name > { sanitize ( failingCheck . type ) } </ Result . Name >
152
152
< Result . Description >
153
153
{ failingCheck . type === 'security'
154
- ? 'Insecure URL, use HTTPS insted of HTTP'
154
+ ? 'Insecure URL, use HTTPS instead of HTTP'
155
155
: null }
156
156
{ failingCheck . type === 'fetch_attempt' &&
157
157
failingCheck . metadata . fetchStatusCode &&
@@ -177,7 +177,7 @@ export const Linter = ({ rows }: LinterProps) => {
177
177
? 'This image is too large, keep it under 1mb'
178
178
: null }
179
179
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]" >
181
181
{ row . result . source }
182
182
</ span >
183
183
</ Result . Description >
@@ -205,7 +205,7 @@ export const Linter = ({ rows }: LinterProps) => {
205
205
return undefined ;
206
206
} )
207
207
. filter ( Boolean )
208
- . join ( '— ' ) }
208
+ . join ( ' · ' ) }
209
209
</ Result . Metadata >
210
210
</ Result >
211
211
) ;
@@ -228,7 +228,7 @@ export const Linter = ({ rows }: LinterProps) => {
228
228
229
229
return (
230
230
< 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 >
232
232
< Result . Description >
233
233
{ statsReportedNotWorking . length > 0
234
234
? `Not supported in ${ unsupportedClientsString } `
@@ -240,20 +240,19 @@ export const Linter = ({ rows }: LinterProps) => {
240
240
{ statsReportedPartiallyWorking . length > 0
241
241
? `Partially supported in ${ partiallySupportedClientsString } `
242
242
: 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
+
249
244
< a
250
245
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 "
252
247
rel = "noreferrer"
253
248
target = "_blank"
254
249
>
255
- See more info
250
+ More ↗
256
251
</ 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' ) }
257
256
</ Result . Metadata >
258
257
</ Result >
259
258
) ;
@@ -287,9 +286,9 @@ Result.Name = ({
287
286
} : React . ComponentProps < typeof Results . Column > ) => {
288
287
return (
289
288
< 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" >
291
290
< IconWarning />
292
- { children }
291
+ { typeof children === 'string' ? sanitize ( children ) : children }
293
292
</ span >
294
293
</ Results . Column >
295
294
) ;
0 commit comments