Extravi / araa-search

A privacy-respecting, ad-free, self-hosted Google metasearch engine with strong security that offers full API support and utilizes Qwant for images, and DuckDuckGo for auto-complete.
https://araa.extravi.dev
GNU Affero General Public License v3.0
241 stars 22 forks source link

Fix IndexError for bangs with multiple replacement strings #135

Closed amogusussy closed 5 months ago

amogusussy commented 6 months ago

Redo of #133. All this does is replace each string that says '{}' with '{q}'. This is so that when there's multiple '{}' strings in a line, it replaces all of them, without throwing any errors. This is the command I've used to do this: sed -i "s/{}/{q}/g" bangs.json

You can run this to verify that nothing else has been changed:

curl -s "https://raw.githubusercontent.com/Extravi/araa-search/main/bangs.json" | sed "s/{}/{q}/g" | diff bangs.json -

There should be no output, indicating no difference other than the changes I've done with sed.

Extravi commented 5 months ago

thank you