Fix ampersand in artist names breaking search queries
This commit is contained in:
parent
7de84c535c
commit
d2c1e24ff7
1 changed files with 2 additions and 1 deletions
|
|
@ -88,7 +88,8 @@ class MusicMatchingEngine:
|
|||
|
||||
# Replace common separators with spaces to preserve word boundaries.
|
||||
# Include hyphen in separator replacement for artist names like "AC/DC" vs "AC-DC"
|
||||
text = re.sub(r'[._/-]', ' ', text)
|
||||
# Include '&' so "Pig&Dan" becomes "Pig Dan" (matches "Pig & Dan" on Soulseek)
|
||||
text = re.sub(r'[._/&-]', ' ', text)
|
||||
|
||||
# Keep alphanumeric characters, spaces, AND the '$' sign.
|
||||
text = re.sub(r'[^a-z0-9\s$]', '', text)
|
||||
|
|
|
|||
Loading…
Reference in a new issue