Skip to content

Commit

Permalink
encode uris
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed May 27, 2024
1 parent 2bab850 commit d23c227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/components/Boost.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@
loading = true;
axios
.get(
`/boost/invoice/generate?amount=${selectedBoost?.sats}&name=${$boost?.name.replaceAll(
'&',
'%26'
)}&time=${selectedBoost?.time}`
`/boost/invoice/generate?amount=${selectedBoost?.sats}&name=${encodeURIComponent($boost?.name || 'location')}&time=${selectedBoost?.time}`
)
.then(async function (response) {
invoice = response.data['payment_request'];
Expand Down Expand Up @@ -302,7 +299,7 @@

<a
href="https://twitter.com/share?text=I just boosted {$boost.name
? $boost.name.replaceAll('&', '%26')
? encodeURIComponent($boost.name)
: 'this location'} on @btcmap. Check them out!&url=https://btcmap.org/merchant/{$boost.id}&hashtags=bitcoin"
target="_blank"
rel="noreferrer"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/map/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ export const generateMarker = (
<use width='16px' height='16px' href="/icons/popup/spritesheet.svg#clock"></use>
</svg>
<span class='text-body dark:text-white'>${element.tags['opening_hours']}</span>
</div>`
</div>`
: ''
}
Expand Down

0 comments on commit d23c227

Please sign in to comment.