Encode cgit URIs properly

Fixes FS#45276 and FS#45277.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2015-06-09 13:50:39 +02:00
parent f4e5ea5f57
commit 631d7bdff9
2 changed files with 6 additions and 6 deletions

View file

@ -82,10 +82,10 @@ $sources = pkg_sources($row["ID"]);
<h4><?= __('Package Actions') ?></h4> <h4><?= __('Package Actions') ?></h4>
<ul class="small"> <ul class="small">
<li> <li>
<a href="<?= $cgit_uri . '/tree/PKGBUILD?h=' . $row['BaseName'] ?>"><?= __('View PKGBUILD') ?></a> / <a href="<?= $cgit_uri . '/tree/PKGBUILD?h=' . urlencode($row['BaseName']) ?>"><?= __('View PKGBUILD') ?></a> /
<a href="<?= $cgit_uri . '/log/?h=' . $row['BaseName'] ?>"><?= __('View Changes') ?></a> <a href="<?= $cgit_uri . '/log/?h=' . urlencode($row['BaseName']) ?>"><?= __('View Changes') ?></a>
</li> </li>
<li><a href="<?= $cgit_uri . '/snapshot/' . $row['BaseName'] . '.tar.gz' ?>"><?= __('Download snapshot') ?></a> <li><a href="<?= $cgit_uri . '/snapshot/' . urlencode($row['BaseName']) . '.tar.gz' ?>"><?= __('Download snapshot') ?></a>
<li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li> <li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li>
<li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li> <li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li>
<?php if ($uid): ?> <?php if ($uid): ?>

View file

@ -33,10 +33,10 @@ $pkgs = pkgbase_get_pkgnames($base_id);
<h4><?= __('Package Actions') ?></h4> <h4><?= __('Package Actions') ?></h4>
<ul class="small"> <ul class="small">
<li> <li>
<a href="<?= $cgit_uri . '/tree/PKGBUILD?h=' . $row['Name'] ?>"><?= __('View PKGBUILD') ?></a> / <a href="<?= $cgit_uri . '/tree/PKGBUILD?h=' . urlencode($row['Name']) ?>"><?= __('View PKGBUILD') ?></a> /
<a href="<?= $cgit_uri . '/log/?h=' . $row['Name'] ?>"><?= __('View Changes') ?></a> <a href="<?= $cgit_uri . '/log/?h=' . urlencode($row['Name']) ?>"><?= __('View Changes') ?></a>
</li> </li>
<li><a href="<?= $cgit_uri . '/snapshot/' . $row['Name'] . '.tar.gz' ?>"><?= __('Download snapshot') ?></a> <li><a href="<?= $cgit_uri . '/snapshot/' . urlencode($row['Name']) . '.tar.gz' ?>"><?= __('Download snapshot') ?></a>
<li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li> <li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li>
<li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li> <li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li>
<?php if ($uid): ?> <?php if ($uid): ?>