pbs.fixExternalLinks.js Demo

On this page, all links that are local to the site (same domain) should open in the current tab, and all remote links should be marked with an icon and open in a new tab.

This is a paragraph that contains a relative link to the previous example. It should be treated like a local link, so no icon and open in this tab.

This paragraph contains an absolute link to the first example in this instalement (will only work if the sample files for this instalment are being served from http://localhost/pbs24/). Assuming you are serving this page from your local web server (localhost), it should also be rendered as a local link, i.e. no icon and open in this tab.

This paragraph contains a link to an external domain that would have been considered external, but was not because it has the CSS class pbs-ignore.

The link in this paragraph goes to the domain www.xkpasswd.net. It would ordinarily have been considered external, but the function was called with the appropraite config to mark the domain www.xkpasswd.net as a local domain.

The link in this paragraph goes to www.localhost, a non-existent sub-domain of localhost. Assuming you are serving this page from your local web server (localhost), it should also be rendered as a local link.

Both of the links in the list below should be marked as external, i.e. they should open in a new tab: