function fb_scrub_urls in Drupal for Facebook 5
Same name and namespace in other branches
- 5.2 fb.module \fb_scrub_urls()
- 6.3 fb.module \fb_scrub_urls()
- 6.2 fb.module \fb_scrub_urls()
- 7.3 fb.module \fb_scrub_urls()
This method will clean up URLs. When serving canvas pages, extra information is included in URLs (see fb_settings.inc). This will remove the extra information.
4 calls to fb_scrub_urls()
- fb_add_js in ./
fb.module - Helper function for FBJS files.
- fb_user_create_local_user in ./
fb_user.module - Creates a local Drupal account for the specified facebook user id.
- fb_user_fb in ./
fb_user.module - Implementation of hook_fb.
- _fb_user_sync_redirect in ./
fb_user.module
File
- ./
fb.module, line 534
Code
function fb_scrub_urls($content) {
foreach (array(
FB_SETTINGS_APP_NID,
FB_SETTINGS_PAGE_TYPE,
) as $key) {
$patterns[] = "|{$key}/[^/]*/|";
$replacements[] = "";
}
$content = preg_replace($patterns, $replacements, $content);
return $content;
}