Keyword badges link to "Name, Description" search

Checklist

  • I confirm that this is an issue with aurweb's code and not a user-uploaded package.
  • I have described the bug in complete detail in the Description section.
  • I have specified steps in the Reproduction section.

Description

Clicking on keyword "badge" goes to a search page using "Name, Description" search type, instead of "Keywords" search type. This can produce unexpected results.

Reproduction

  1. Open https://aur.archlinux.org/packages/tensorrt
  2. Click on "ai" badge in "Keywords:" section.

Result: search results contain listings unrelated to AI and which do not necessarily have "ai" keyword assigned.

Expected: search results with "ai" keyword assigned to them only.

Potential fix:

I'm not familiar with the dev setup, but with a brief search, I think these lines should be changed:

web/template/pkgbase_details.php

81:             echo get_uri('/packages/') . '?K=' . urlencode($kw) . '&SB=p';

to

81:             echo get_uri('/packages/') . '?K=' . urlencode($kw) . '&SeB=k';

web/template/pkg_details.php

152:            echo get_uri('/packages/') . '?K=' . urlencode($kw) . '&SB=p';

to

152:            echo get_uri('/packages/') . '?K=' . urlencode($kw) . '&SeB=k';

templates/partials/packages/details.html

56:                       href="/packages/?K={{ keyword.Keyword }}&SB=p"

to

56:                       href="/packages/?K={{ keyword.Keyword }}&SeB=k"
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information