diff --git a/src/parsers/UrlParser.vala b/src/parsers/UrlParser.vala index 7c0a8ce2..a979d00c 100644 --- a/src/parsers/UrlParser.vala +++ b/src/parsers/UrlParser.vala @@ -39,7 +39,11 @@ public class UrlParser : TextParser { /* Add the URL filepath if the matched text is a valid file path */ private void highlight_filepath( FormattedText text, MatchInfo match ) { - if( FileUtils.test( match.fetch( 0 ), FileTest.EXISTS ) ) { + var str = match.fetch( 0 ); + if( str.substring( 0, 7 ) == "file://" ) { + str = str.substring( 7 ); + } + if( FileUtils.test( str, FileTest.EXISTS ) ) { add_tag( text, match, 0, FormatTag.URL, get_text( match, 0 ) ); } }