public static function prettyEncodedWikiUrl( $articlePath, $article ) {
		$s = strtr( $article, ' ', '_' );
		$s = urlencode( $s );
		$s = str_ireplace(
			[ '%3B', '%40', '%24', '%21', '%2A', '%28', '%29', '%2C', '%2F', '%3A' ],
			[ ';', '@', '$', '!', '*', '(', ')', ',', '/', ':' ],
			$s
		);

		$s = str_replace( '$1', $s, $articlePath );

		return $s;
	}
public static function prettyEncodedWikiUrl( $articlePath, $article ) {
		$s = strtr( $article, ' ', '_' );
		$s = urlencode( $s );
		$s = str_ireplace(
			[ '%3B', '%40', '%24', '%21', '%2A', '%28', '%29', '%2C', '%2F', '%3A' ],
			[ ';', '@', '$', '!', '*', '(', ')', ',', '/', ':' ],
			$s
		);

		$s = str_replace( '$1', $s, $articlePath );

		return $s;
	}
public static function prettyEncodedWikiUrl ( $ articlePath , $ article ) { $ s = strtr ( $ article , ' ' , '_' ) ; $ s = urlencode ( $ s ) ; $ s = str_ireplace ( [ '%3B' , '%40' , '%24' , '%21' , '%2A' , '%28' , '%29' , '%2C' , '%2F' , '%3A' ] , [ ';' , '@' , '$' , '!' , '*' , '(' , ')' , ',' , '/' , ':' ] , $ s ) ; $ s = str_replace ( '$1' , $ s , $ articlePath ) ; return $ s ; }
Encode a page title the way MediaWiki would.

This is based on MediaWiki's wfUrlencode().

@param string $articlePath
@param string $article
@return string
Encode a page title the way MediaWiki would .