File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ interface AppConfig {
5959 DISABLE_DISPLAY_KEYS : boolean ;
6060}
6161
62+ const decodeHtmlEntities = ( text : string ) : string => {
63+ const textarea = document . createElement ( 'textarea' ) ;
64+ textarea . innerHTML = text ;
65+ return textarea . value ;
66+ } ;
67+
6268export const ModelSelectionButton : React . FC < { } > = ( { } ) => {
6369
6470 const dispatch = useDispatch ( ) ;
@@ -410,12 +416,15 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
410416 if ( status == "unknown" ) {
411417 message = "Click the status icon to test again before applying." ;
412418 } 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 ) ;
414421 }
415422
416423 const borderStyle = [ 'error' , 'unknown' ] . includes ( status ) ? '1px dashed text.secondary' : undefined ;
417424 const noBorderStyle = [ 'error' , 'unknown' ] . includes ( status ) ? 'none' : undefined ;
418425
426+ console . log ( message )
427+
419428 return (
420429 < >
421430 < TableRow
@@ -498,7 +507,8 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
498507 < TableCell colSpan = { 2 } align = "right" > </ TableCell >
499508 < TableCell colSpan = { 6 } >
500509 < Typography variant = "caption" color = "#c82c2c" >
501- { message }
510+ { message }
511+
502512 </ Typography >
503513 </ TableCell >
504514 </ TableRow >
You can’t perform that action at this time.
0 commit comments