Subject: | URL encoding not preserved in href attributes |
Date: | Tue, 15 Jun 2010 10:08:13 -0700 |
To: | bug-HTML-WikiConverter [...] rt.cpan.org |
From: | Don Maszle <dmaszle [...] gmail.com> |
Using HTML::WikiConverter-0.68 via command-line (and the current
web interface at http://toolserver.org/~diberri/cgi-bin/html2wiki/index.cgi),
URL encoded entities are not preserved when converting href attributes.
Depending on the Wiki dialect, this can result in broken links.
The most common problem is likely to arise for URLs having spaces
encoded as "%20" which produces broken links for popular dialects
such as MediaWiki, WIkkaWiki, GoogleCode, et al.
This does not appear to be true for similarly encoded src attributes.
I've amended our local installation by removing the "uri_unescape" call
from line 502 in the main module's __rel2abs() sub:
HTML::WikiConverter.pm: 502c
$node->attr( $attr => URI->new_abs( $node->attr($attr),
$self->base_uri )->as_string );
however, I'm not sure if that call is serving some other purpose.
Regards,
Don Maszle