[aur-dev] [PATCH 1/3] header.php: Do not lowercase language selection entries
Commit 091c2b5f5523773604699b914c19e6b02ce290bc introduced lower casing to the language drop-down list. Revert this and use htmlspecialchars() to escape language entries instead. Addresses FS#32453. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/template/header.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/template/header.php b/web/template/header.php index a60174b..92cb2ff 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -37,9 +37,9 @@ reset($SUPPORTED_LANGS); foreach ($SUPPORTED_LANGS as $lang => $lang_name) { - print '<option value="' . strtolower($lang) . '"' . + print '<option value="' . htmlspecialchars($lang, ENT_QUOTES) . '"' . ($lang == $LANG ? ' selected="selected"' : '') . - '>' . strtolower($lang) . "</option>\n"; + '>' . htmlspecialchars($lang) . "</option>\n"; } ?> </select> -- 1.8.0
Fixes FS#32449. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/html/home.php | 2 +- web/template/pkg_details.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/html/home.php b/web/html/home.php index 97de8bb..4e489ba 100644 --- a/web/html/home.php +++ b/web/html/home.php @@ -93,7 +93,7 @@ $dbh = db_connect(); <div id="pkgsearch" class="widget"> <form id="pkgsearch-form" method="get" action="<?= get_uri('/packages/'); ?>"> <fieldset> - <label for="pkgsearch-field">Package Search:</label> + <label for="pkgsearch-field"><?= __('Package Search') ?>:</label> <input type="hidden" name="O" value="0" /> <input type="text" name="K" size="30" value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength="35" /> </fieldset> diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 1c76557..30d920f 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -32,7 +32,7 @@ $sources = package_sources($row["ID"]); <h2><?= __('Package Details') . ': ' . htmlspecialchars($row['Name']) . ' ' . htmlspecialchars($row['Version']) ?></h2> <div id="detailslinks" class="listing"> <div id="actionlist"> - <h4>Package Actions</h4> + <h4><?= __('Package Actions') ?></h4> <ul class="small"> <li><a href="<?= $urlpath ?>/PKGBUILD"><?= __('View PKGBUILD') ?></a></li> <li><a href="<?= $urlpath . '/' . $row['Name'] ?>.tar.gz"><?= __('Download tarball') ?></a></li> @@ -86,7 +86,7 @@ $sources = package_sources($row["ID"]); <td class="wrap"><?= htmlspecialchars($row['Description']); ?></td> </tr> <tr> - <th>Upstream URL:</th> + <th><?= __('Upstream URL') . ': ' ?></th> <td><a href="<?= htmlspecialchars($row['URL'], ENT_QUOTES) ?>" title="<?= __('Visit the website for') . ' ' . htmlspecialchars( $row['Name'])?>"><?= htmlspecialchars($row['URL'], ENT_QUOTES) ?></a></td> </tr> <tr> -- 1.8.0
Fixes FS#32455. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/template/pkg_details.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 30d920f..cdf2764 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -69,10 +69,10 @@ $sources = package_sources($row["ID"]); </div> <p> <?php if ($row["MaintainerUID"] === NULL): ?> - <input type="submit" class="button" name="do_Adopt" value="<?= __("Adopt Packages") ?>" /> + <input type="submit" class="button" name="do_Adopt" value="<?= __("Adopt Package") ?>" /> <?php elseif ($uid == $row["MaintainerUID"] || $atype == "Trusted User" || $atype == "Developer"): ?> - <input type="submit" class="button" name="do_Disown" value="<?= __("Disown Packages") ?>" /> + <input type="submit" class="button" name="do_Disown" value="<?= __("Disown Package") ?>" /> <?php endif; ?> </p> </form> -- 1.8.0
participants (1)
-
Lukas Fleischer