Page MenuHomePhabricator

URL-escaped version of {{PAGENAME}}
Closed, ResolvedPublic

Description

Author: poccil

Description:
Previously I asked for an escaped version of
PAGENAME and came back with one that escaped spaces
to underscores. That's not exactly what I wanted.
What I wanted was a variable that escaped the name
of a page as though it were a URL. For example:

Page name =>  Page%20name

I would prefer that such a variable be named
PAGENAMEUE.

Thanks.

--[[:w:User:Poccil]]


Version: unspecified
Severity: enhancement

Details

Reference
bz651

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:57 PM
bzimport set Reference to bz651.
bzimport added a subscriber: Unknown Object (MLST).

river wrote:

What is the difference between an underscore and a %20 for a URL to a wiki page?

poccil wrote:

(In reply to comment #1)

What is the difference between an underscore and a %20 for

a URL to a wiki page?

The difference is manifested when one wants to use the
variable to express a search phrase as an external link to a
search engine. For example, Google will not parse the name
Page_name in the same way as it would parse Page%20name.
--User:Poccil

mrnobo1024 wrote:

Template:Google is often used with a parameter other than the page
title, so a generalized {{urlescape:text}} would be useful.

poccil wrote:

Just to check the status of this feature request.

erik2211 wrote:

I support the suggestion for:

A general {{urlescape:text}}

Wiki.Melancholie wrote:

This is possible by typing {{PAGENAMEE}} now! Thus I
close this bug.

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:20 AM