Exclude brackets at the end of a URL in LinkifyHTML()
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20347
(cherry picked from commit 6d2b728fb1)
This commit is contained in:
committed by
Wayne Stambaugh
parent
6cfd84993c
commit
785be9bd59
@@ -646,7 +646,7 @@ wxString RemoveHTMLTags( const wxString& aInput )
|
||||
|
||||
wxString LinkifyHTML( wxString aStr )
|
||||
{
|
||||
static wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\s\u00b6])" ),
|
||||
static wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\(\\)\\s\u00b6])" ),
|
||||
wxRE_ICASE );
|
||||
|
||||
regex.ReplaceAll( &aStr, "<a href=\"\\0\">\\0</a>" );
|
||||
|
||||
Reference in New Issue
Block a user