mozilla / pontoon

Mozilla's Localization Platform
https://pontoon.mozilla.org
BSD 3-Clause "New" or "Revised" License
1.46k stars 528 forks source link

Pontoon search fails for search terms with $ #3333

Closed flodolo closed 1 month ago

flodolo commented 1 month ago

Example: searching for moco_link finds one result, while searching for $moco_link finds none.

mathjazz commented 1 month ago

@harmitgoswami Note that the string with $moco_link has since been rejected (and toggling Search in rejected translations also doesn't help).

Relatedly, searching for %(moco_link) also doesn't return any results and (moco_link results in a server error.

mathjazz commented 1 month ago

This is probably due to the switch to regex for search, so you'd need to use something like re.escape().