MCPcopy Create free account
hub / github.com/KiCad/kicad-source-mirror / EscapeHTML

Function EscapeHTML

common/string_utils.cpp:573–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571
572
573wxString EscapeHTML( const wxString& aString )
574{
575 wxString converted;
576
577 converted.reserve( aString.length() );
578
579 for( wxUniChar c : aString )
580 {
581 if( c == '\"' )
582 converted += wxT( """ );
583 else if( c == '\'' )
584 converted += wxT( "'" );
585 else if( c == '&' )
586 converted += wxT( "&" );
587 else if( c == '<' )
588 converted += wxT( "&lt;" );
589 else if( c == '>' )
590 converted += wxT( "&gt;" );
591 else
592 converted += c;
593 }
594
595 return converted;
596}
597
598
599wxString UnescapeHTML( const wxString& aString )

Callers 15

BOOST_AUTO_TEST_CASEFunction · 0.85
LoadGerberFileMethod · 0.85
DescribeRefFunction · 0.85
GenerateInfoMethod · 0.85
displayErrorsMethod · 0.85
SetHtmlNameMethod · 0.85
SetHtmlAliasOfMethod · 0.85
SetHtmlDescMethod · 0.85
SetHtmlKeywordsMethod · 0.85
GetHtmlFieldRowMethod · 0.85
DiffSymbolMethod · 0.85
applyChangelistMethod · 0.85

Calls 1

lengthMethod · 0.45

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.68
DiffSymbolMethod · 0.68
reportHeaderMethod · 0.68
reportClearanceMethod · 0.68
DiffFootprintMethod · 0.68