Camen Design Forum

Problem with IP Address links

Martijn

Hmm. Maybe. I haven’t tested this, but if you look in functions.php on line 222 [1] you’ll find where the last part of a domain is found. Behind it you could add a check for port numbers, making the line:

% New line 222 of functions.php
                        (?:\.[\p{L}\p{M}\p{N}]+)+(?::\d+)?              # TLDs (also letters, diacritics & numbers only), optionally followed by port
%

Again, this is not tested. Regular expressions for finding URLs in running text are always a little spooky so I give no guarantees.

[1]: https://github.com/Kroc/NoNonsenseForum/blob/e8a996c6cd3eb97c9de8762e3aa31b3b29508f93/lib/functions.php#L222

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn