From 015a05016987d1ca0e02676f3023fc33b6615dd3 Mon Sep 17 00:00:00 2001 From: Jeff Young <jeff@rokeby.ie> Date: Fri, 5 Jan 2024 11:02:47 +0000 Subject: [PATCH] Escape error messages for HTML. --- common/footprint_info.cpp | 2 +- pcbnew/pcb_io/altium/altium_parser_pcb.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp index 59a4db08b8..995d0d0002 100644 --- a/common/footprint_info.cpp +++ b/common/footprint_info.cpp @@ -124,7 +124,7 @@ void FOOTPRINT_LIST::DisplayErrors( wxTopLevelWindow* aWindow ) while( std::unique_ptr<IO_ERROR> error = PopError() ) { - wxString tmp = error->Problem(); + wxString tmp = EscapeHTML( error->Problem() ); // Preserve new lines in error messages so queued errors don't run together. tmp.Replace( wxS( "\n" ), wxS( "<BR>" ) ); diff --git a/pcbnew/pcb_io/altium/altium_parser_pcb.cpp b/pcbnew/pcb_io/altium/altium_parser_pcb.cpp index 6af13b880c..dd4ce77709 100644 --- a/pcbnew/pcb_io/altium/altium_parser_pcb.cpp +++ b/pcbnew/pcb_io/altium/altium_parser_pcb.cpp @@ -724,7 +724,7 @@ APAD6::APAD6( ALTIUM_PARSER& aReader ) size_t subrecord5 = aReader.ReadAndSetSubrecordLength(); if( subrecord5 < 114 ) - THROW_IO_ERROR( wxT( "Pads6 stream subrecord has length < 114, which is unexpected" ) ); + THROW_IO_ERROR( wxT( "Pads6 stream subrecord5 has length < 114, which is unexpected" ) ); layer = static_cast<ALTIUM_LAYER>( aReader.Read<uint8_t>() ); tolayer = ALTIUM_LAYER::UNKNOWN;