It is usually a good idea to sanitize URL's with check_url, but not in all situations.

Say I have this URL: <go href="http://www.example.com/?pid=12566&bid=123456&urlpath=http://www.example.com/prod/12000-some-product/">product link</go>

The resulting URL is http://www.example.com/?pid=12566&amp;bid=123456&amp;urlpath=http://www.example.com/prod/12000-some-product/

So &'s are turned into &amp;'s by the check_url function.

It works if I remove check_url() from this line, in gotwo.module:

'content' => $disclaimer_time . ';url=' . check_url($result->dst),

To:

'content' => $disclaimer_time . ';url=' . $result->dst,

Should this perhaps be an option under the settings?
"[*] Include check_url (sanitizes your URL and for example converts &'s into &amp;'s"

Comments

ressa’s picture

Issue summary: View changes

added some more text to settings description

hass’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

&amp; is correct in html code.

ressa’s picture

That may be, but it breaks the links.

  • https://drupal.org/project/issues/gotwo?status=All&page=1
  • https://drupal.org/project/issues/gotwo?status=All&amp;page=1

Link #1 takes you to the second page as expected, whereas link #2 takes you to the first page.

hass’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Category: Support request » Bug report
Status: Closed (works as designed) » Active

Than we need to use any other validation function. Please provide a patch.

ressa’s picture

Status: Active » Closed (outdated)