You are here

function wikitools_decode_page_name in Wikitools 6.2

Same name and namespace in other branches
  1. 5 wikitools.module \wikitools_decode_page_name()
  2. 6 wikitools.module \wikitools_decode_page_name()
  3. 7 wikitools.module \wikitools_decode_page_name()

Decode page name given via URL.

File

./wikitools.module, line 279
A non-intrusive module to have some wiki-like behaviour.

Code

function wikitools_decode_page_name($encoded_page_name) {
  $page_name = trim(urldecode($encoded_page_name));
  if (wikitools_treat_underscore_as_space()) {
    $page_name = str_replace('_', ' ', $page_name);
  }
  if (wikitools_treat_dash_as_space()) {
    $page_name = str_replace('-', ' ', $page_name);
  }
  return $page_name;
}