ID #76 (Previous | Next)

html =

    "<a href="http://www.example.com/node/1">Host and path</a><br /><a href="http://www.example.com">Host, no path</a><br /><a href="/drupal/tb_sirate/node/1">Path, no host</a><br /><a href="node/1">Relative path</a>"

result =

    "Host and path [1]\nHost, no path [2]\nPath, no host [3]\nRelative path [4]\n\n[1] http://www.example.com/node/1\n[2] http://www.example.com\n[3] http://www.candidity.co.uk/drupal/tb_sirate/node/1\n[4] node/1\n"

expected =

    "Host and path [1]\nHost, no path [2]\nPath, no host [3]\nRelative path [4]\n\n[1] http://www.example.com/node/1\n[2] http://www.example.com\n[3] http://www.candidity.co.uk/drupal/tb_sirate/node/1\n[4] node/1\n"