File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ interface AppConfig {
59
59
DISABLE_DISPLAY_KEYS : boolean ;
60
60
}
61
61
62
+ const decodeHtmlEntities = ( text : string ) : string => {
63
+ const textarea = document . createElement ( 'textarea' ) ;
64
+ textarea . innerHTML = text ;
65
+ return textarea . value ;
66
+ } ;
67
+
62
68
export const ModelSelectionButton : React . FC < { } > = ( { } ) => {
63
69
64
70
const dispatch = useDispatch ( ) ;
@@ -410,12 +416,15 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
410
416
if ( status == "unknown" ) {
411
417
message = "Click the status icon to test again before applying." ;
412
418
} else if ( status == "error" ) {
413
- message = testedModels . find ( t => t . id == model . id ) ?. message || "Unknown error" ;
419
+ const rawMessage = testedModels . find ( t => t . id == model . id ) ?. message || "Unknown error" ;
420
+ message = decodeHtmlEntities ( rawMessage ) ;
414
421
}
415
422
416
423
const borderStyle = [ 'error' , 'unknown' ] . includes ( status ) ? '1px dashed text.secondary' : undefined ;
417
424
const noBorderStyle = [ 'error' , 'unknown' ] . includes ( status ) ? 'none' : undefined ;
418
425
426
+ console . log ( message )
427
+
419
428
return (
420
429
< >
421
430
< TableRow
@@ -498,7 +507,8 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
498
507
< TableCell colSpan = { 2 } align = "right" > </ TableCell >
499
508
< TableCell colSpan = { 6 } >
500
509
< Typography variant = "caption" color = "#c82c2c" >
501
- { message }
510
+ { message }
511
+
502
512
</ Typography >
503
513
</ TableCell >
504
514
</ TableRow >
You can’t perform that action at this time.
0 commit comments