API16

API16:JApplication/stringURLSafe

From Joomla! Documentation

Revision as of 02:48, 13 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

Description

This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

static stringURLSafe($string)
Parameter Name Default Value Description
$string $input String to process

Returns

string Processed string

Defined in

libraries/joomla/application/application.php

Importing

jimport( 'joomla.application.application' );

Source Body

static public function stringURLSafe($string)
{
        $app = &JFactory::getApplication();
        if (self::getCfg('unicodeslugs') == 1)
        {
                $output = JFilterOutput::stringURLUnicodeSlug($string);
        } else {
                $output = JFilterOutput::stringURLSafe($string);
        }
        return $output;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />