From c7c283796e76a98571e89c28b9b936ac39420acc Mon Sep 17 00:00:00 2001 From: Gustavo Noronha Silva Date: Sun, 4 Oct 2009 12:33:41 +0100 Subject: Improve localhost matching Also consider localhost being used along with a port, with a path, and with a domain. Bug #595690 --- embed/ephy-web-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'embed') diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index a7ee21324..3d16eab0a 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1004,7 +1004,7 @@ ephy_web_view_init (EphyWebView *web_view) priv->security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN; priv->monitor_directory = FALSE; - priv->non_search_regex = g_regex_new ("(^localhost$|" + priv->non_search_regex = g_regex_new ("(^localhost(\\.[^[:space:]]+)?(:\\d+)?(/.*)?$|" "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]$|" "^::[0-9a-f:]*$|" /* IPv6 literals */ "^[0-9a-f:]+:[0-9a-f:]*$|" /* IPv6 literals */ -- cgit v1.2.3