https://bugzilla.wikimedia.org/show_bug.cgi?id=30803

--- Comment #10 from darklama <[email protected]> 2012-05-26 17:18:52 UTC ---
(In reply to comment #9)
> There is handling for all of this already in the mw.Uri module and also
> integrated with the mw.Title module. mw.util is a arbitrary/simple utilities,
> of which most really belong in a separate module. Adding features like this
> means re-inventing wheels that have already been polished in other modules.
>
> The Uri and Title modules aren't all that big but do their job
> really well (including handling for hash fragments, which you
> mentioned), so if you need something like this in your code, I'd
> say just use those modules directly and be done with it.

The mw.Uri module handles parsing and proper encoding of URIs that is
compliant with the URI spec. However Titles are allowed to include "?"
which must be encoded to avoid interpretation as a query string when
converted into URI. Titles are not allowed to contain some character
which are valid in a URI, like "[" and "|". Hashes seem to be encoded
differently from the URI spec as well. mw.Uri and mw.Title operate in
isolation without dependency or understanding of the needs of the other.
As a consequence of this isolation, none of these things are handled by
mw.Uri or mw.Title. mw.Title depends on mw.util.wikiGetlink for proper
conversion from Title or URI, but there are bugs and missing features.

> I see your patch also contains handling for action paths, which is nice.
> I'm not sure if mw.Title / mw.Uri support that right now. If it makes
> sense to have there, that would be great to have!

mw.Title and mw.Uri does not support that right now, just as they do not
support conversation between each other.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to