mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: strip whitespace when parsing package keywords
Remove all extra whitespace when parsing Keywords to ensure we don't add empty keywords in the DB. Closes: #332 Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
parent
a509e40474
commit
1d6335363c
2 changed files with 31 additions and 1 deletions
|
@ -98,7 +98,7 @@ async def pkgbase_keywords(request: Request, name: str,
|
|||
|
||||
# Lowercase all keywords. Our database table is case insensitive,
|
||||
# and providing CI duplicates of keywords is erroneous.
|
||||
keywords = set(k.lower() for k in keywords.split(" "))
|
||||
keywords = set(k.lower() for k in keywords.split())
|
||||
|
||||
# Delete all keywords which are not supplied by the user.
|
||||
with db.begin():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue