gitweb: use href() when generating URLs in OPML
PATCH 1/1 gitweb: use href() when generating URLs in OPML
Since the OPML project list view was hand-coding the RSS and HTML URLs, it didn't respect global options such as use_pathinfo. Make it use href() to ensure consistency with the rest of the gitweb setup.
Signed-off-by Giuseppe Bilotta <[email protected]>
--- gitweb/gitweb.perl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
gitweb/gitweb.perl +2 -2
@@ -6146,8 +6146,8 @@ XML } my $path = esc_html(chop_str($proj{'path'}, 25, 5)); - my $rss = "$my_url?p=$proj{'path'};a=rss"; - my $html = "$my_url?p=$proj{'path'};a=summary"; + my $rss = href('project' => $proj{'path'}, 'action' => 'rss', -full => 1); + my $html = href('project' => $proj{'path'}, 'action' => 'summary', -full => 1); print "<outline type=\"rss\" text=\"$path\" title=\"$path\" xmlUrl=\"$rss\" htmlUrl=\"$html\"/>\n"; } print <<XML;
Signature · 1 line
1.5.6.5
Quoted 3 lines · Giuseppe Bilotta
Since the OPML project list view was hand-coding the RSS and HTML URLs, it didn't respect global options such as
use_pathinfo. Make it usehref()to ensure consistency with the rest of the gitweb setup.
Good catch. I guess it was before href(..., -full=>1)...
Quoted 2 lines
Signed-off-by Giuseppe Bilotta <[email protected]>
Acked-by Jakub Narebski <[email protected]>
Quoted 23 lines
--- gitweb/gitweb.perl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)gitweb/gitweb.perl +2
-2@@ -6146,8 +6146,8 @@ XML } my $path = esc_html(chop_str($proj{'path'}, 25, 5)); - my $rss = "$my_url?p=$proj{'path'};a=rss"; - my $html = "$my_url?p=$proj{'path'};a=summary"; + my $rss = href('project' => $proj{'path'}, 'action' => 'rss', -full => 1); + my $html = href('project' => $proj{'path'}, 'action' => 'summary', -full => 1); print "<outline type=\"rss\" text=\"$path\" title=\"$path\" xmlUrl=\"$rss\" htmlUrl=\"$html\"/>\n"; } print <<XML;Signature · 1 line
1.5.6.5
Signature · 2 lines
Jakub Narebski Poland
Thanks, both; applied.