You are here

function securepages_urlencode in Secure Pages 6

Same name and namespace in other branches
  1. 5 securepages.module \securepages_urlencode()

Copy of Drupals so we can redirect correctly

1 call to securepages_urlencode()
securepages_url in ./securepages.module
Generate a URL from a Drupal menu path. Will also pass-through existing URLs.

File

./securepages.module, line 418
Provide method of creating allowing certain pages to only viewable from https pages

Code

function securepages_urlencode($text) {
  if (variable_get('clean_url', '0')) {
    return str_replace(array(
      '%2F',
      '%26',
      '%23',
      '//',
    ), array(
      '/',
      '%2526',
      '%2523',
      '/%252F',
    ), rawurlencode($text));
  }
  else {
    return str_replace('%2F', '/', rawurlencode($text));
  }
}