User:לערי ריינהארט/tests/bugzilla/url ( . : , ; + & ? ) encoding
Appearance
(Redirected from User:Gangleri/tests/bugzilla/url ( . : , ; + & ? ) encoding)
User:Gangleri/tests/bugzilla/url ( . : , ; + & ? ) encoding → MediaZilla:05530 / bugzilla:05530 – "Consistency between character encoding in {{PAGENAMEE}}, {{SUBPAGENAMEE}} and {{FULLPAGENAMEE}}" PAGENAMEE, SUBPAGENAMEE and FULLPAGENAMEE[edit]* PAGENAMEE: {{PAGENAMEE}} * SUBPAGENAMEE: {{SUBPAGENAMEE}} * FULLPAGENAMEE: {{FULLPAGENAMEE}} * {{fullurl:{{FULLPAGENAME}}}} * {{SERVER}}{{localurl:{{FULLPAGENAME}}}} * Please never use: : {{fullurl:{{FULLPAGENAMEE}}}} : {{fullurl:{{NAMESPACE}}:{{PAGENAMEE}}}} : {{SERVER}}{{localurl:{{FULLPAGENAMEE}}}} : {{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}}} generates:
22:06, 10 April 2006 (UTC)[edit]* PAGENAMEE: {{subst:PAGENAMEE}} * SUBPAGENAMEE: {{subst:SUBPAGENAMEE}} * FULLPAGENAMEE: {{subst:FULLPAGENAMEE}} generates:
references, links[edit]case MAG_PAGENAME: return $this->mTitle->getText(); case MAG_PAGENAMEE: return $this->mTitle->getPartialURL(); case MAG_FULLPAGENAME: return $this->mTitle->getPrefixedText(); case MAG_FULLPAGENAMEE: return $this->mTitle->getPrefixedURL(); case MAG_SUBPAGENAME: return $this->mTitle->getSubpageText(); case MAG_SUBPAGENAMEE: return $this->mTitle->getSubpageUrlForm(); → MAG_PAGENAMEE /** * Get the URL-encoded form of the main part * @return string * @access public */ function getPartialURL() { return $this->mUrlform; } → MAG_FULLPAGENAMEE /** * Get a URL-encoded title (not an actual URL) including interwiki * @return string the URL-encoded form * @access public */ function getPrefixedURL() { $s = $this->prefix( $this->mDbkeyform ); $s = str_replace( ' ', '_', $s ); $s = wfUrlencode ( $s ) ; # Cleaning up URL to make it look nice -- is this safe? $s = str_replace( '%28', '(', $s ); $s = str_replace( '%29', ')', $s ); return $s; } → MAG_SUBPAGENAMEE /** * Get a URL-encoded form of the subpage text * @return string URL-encoded subpage name */ function getSubpageUrlForm() { $text = $this->getSubpageText(); $text = wfUrlencode( str_replace( ' ', '_', $text ) ); $text = str_replace( '%28', '(', str_replace( '%29', ')', $text ) ); # Clean up the URL; per below, this might not be safe return( $text ); } related issues[edit]
comments[edit] |