ADDED: support naked hyperlinks in tablecells and textboxes.

Also fix flickering due to IS_ROLLOVER flag getting
nuked.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18832

(cherry picked from commit 072d8d55fe)
This commit is contained in:
Jeff Young
2025-02-20 12:57:16 +00:00
parent 2a93af1348
commit f6148f10e1
8 changed files with 52 additions and 27 deletions
+13 -2
View File
@@ -646,8 +646,8 @@ wxString RemoveHTMLTags( const wxString& aInput )
wxString LinkifyHTML( wxString aStr )
{
wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\s\u00b6])" ),
wxRE_ICASE );
static wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\s\u00b6])" ),
wxRE_ICASE );
regex.ReplaceAll( &aStr, "<a href=\"\\0\">\\0</a>" );
@@ -655,6 +655,17 @@ wxString LinkifyHTML( wxString aStr )
}
bool IsURL( wxString aStr )
{
static wxRegEx regex( wxS( "(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\s\u00b6])" ),
wxRE_ICASE );
regex.ReplaceAll( &aStr, "<a href=\"\\0\">\\0</a>" );
return regex.Matches( aStr );
}
bool NoPrintableChars( const wxString& aString )
{
wxString tmp = aString;