Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v4 5/5] git-remote-mediawiki: Add preview subcommand into git mw.

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:57:50

benoit.person@ensimag.fr writes:
+	for (@{ $html_tree->extract_links() }) {
+		my ($link, $element, $attr) = @{ $_ };
+		my $url = url($link)->canonical;
+		$element->attr($attr, URI->new_abs($url, $remote_url));
Actually, this breaks some relative links, like table of content links,
because you consider them relative to URLs like http://example.com/wiki/
but not http://example.com/wiki/index.php/My_Page.

Ideally, links pointing to stg like "#anchor" should not be modified.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help