Skip to content

Commit

Permalink
Enhanced regular expression to be able to match IPv6 addresses (just
Browse files Browse the repository at this point in the history
checking for valid characters)
  • Loading branch information
SebastianZ committed Apr 25, 2013
1 parent f0e309a commit 60d4b6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/content/net/654/issue654.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function runTest()

if (localIPs.length == 2 && remoteIPs.length == 2)
{
var reIP = /\b(?:\d{1,3}\.){3}\d{1,3}\:\d{1,5}\b/;
var reIP = /^((?:\d{1,3}\.){3}\d{1,3}|\[[0-9a-f:]*?\])\:\d{1,5}$/;
FBTest.progress("First Local IP: " + localIPs[0].textContent);
FBTest.compare(reIP, localIPs[0].textContent, "IP address and port number is expected.");
FBTest.progress("Second Local IP: " + localIPs[1].textContent);
Expand Down

0 comments on commit 60d4b6c

Please sign in to comment.