Page MenuHomePhabricator

add URL-friendly function as a complement of {{ns:namespace}}
Closed, ResolvedPublic


Author: anon.hui

Should add a new function {{nss:namespace name}}, so that,
{{nss:user_talk}} will yield "User_talk" (the URL-friendly percent encoded like {{NAMESPACEE}}, especially, when the namespace name is in UTF-8)

According to its complement function,
then {{ns:user_talk}} should yield "User talk" (rather than "User_talk").

Version: 1.12.x
Severity: enhancement



Event Timeline

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

Suggesting {{nse:...}} since -e suffix is used to mark _e_ncoded.

anon.hui wrote:

I prefer {{ns:user_talk}} to be "User talk" (no underscore),
so {{nse:...}} is introduced for the case that underscore is really needed.

Another reason for this is that, the current behavior of {{ns:...}} is inconsistent with either {{NAMESPACE}} or {{NAMESPACEE}}.

  • {{NAMESPACE}}: no underscore, no % encoded
  • {{NAMESPACEE}}: has underscore, has % encoded


  • {{ns:...}}: has underscore, but no % encoded

so, theoretically, {{ns:...}} cannot be used in the either the context that {{NAMESPACE}} or {{NAMESPACEE}} can be used.

anon.hui wrote:

So, theoretically, {{ns:...}} cannot be used in either the context that {{NAMESPACE}} or {{NAMESPACEE}} can be used.

(fix typo in previous comment)