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:
+13
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user