David Baird wrote:
Just been playing with URI::Escape. I always thought you supplied it a
complete URI, and it gave you back the encoded version. But it looks
like you're expected to encode each key and value individually, then
join them together afterwards. 9 times out of 10, it's probably fine
to escape the whole thing, unless you have reserved characters (like
=) in your data.

It's probably more like 999 times out of a thousand, since we've never found this before :) But it's still broken :(

Just to understand where I'm coming from on this. This stuff is way outside what I want to understand. I want to find some infrastructure that does the job so I don't need to understand it. (Bit like the reason I originally looked at Maypole :)

For example, apparently the base standard that all the docs still refer to was obsoleted a little while ago <http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=rfc3986&opt=All+fields&num=25&format=ftp&orgkeyword=uri&filefmt=txt&search_doc=search_all&match_method=entire&abstract=absoff&keywords=keyoff&sort_method=older> and AFAIK its possible to have URIs with all kinds of strange characters now. I really, really don't want to know the details of all that.

mean. Remember the 'escape functions' are TT built-ins. But I don't
think that's the issue. It's pretty clear to me that its broken. The
only question in my mind is what is the best fix?
Maypole::Plugin::LinkTools currently doesn't do any escaping, so that
needs fixed. How about if it accepted an arrayref or hashref (as well
as a plain string) for 'additional', and then it uri + html escaped
each component individually before constructing the link? Arrayref
becomes additional components to the path, hashref becomes a query
string.

I just looked at URI::Escape and at URI. URI might be a better basis for LT? BTW, It points out that hashrefs are dangerous because parameters can be repeated.

For the standard TT templates, I think Template::Plugin::URL may be the way to go. Anybody have any views?

Cheers, Dave



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to