Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi word fixed location #246

Merged

Conversation

dwdunham
Copy link
Contributor

@dwdunham dwdunham commented Jan 4, 2024

If you set the @dracula-fixed-location to "San Diego, California" it ends up looking at "San" which is somewhere in South Korea. This occurs for any fixed-location that has a space. Something like "Portland, Oregon" can be modified to "Portland,Oregon" and still work but we can't remove the space from "San Diego". The reason that spaces in the fixed location break the backend request is that dracula.sh loses everything after the space.

Q: Why does the fixed-location end up as "San"?
A: In dracula.sh the fixed-location is not wrapped in quotes when embedded in the status-right string.

A: In weather_wrapper.sh the call to weather.sh does not wrap the fixed-location argument with quotes.

Q: When these are fixed why do we get a broken link? A: Since we are calling a web service using a url, we need to escape the spaces by changing them to %20

If you set the @dracula-fixed-location to "San Diego, California" it
ends up looking at "San" which is somewhere in South Korea. This occurs
for any fixed-location that has a space. Something like
"Portland, Oregon" can be modified to "Portland,Oregon" and still work
but we can't remove the space from "San Diego". The reason that spaces
in the fixed location break the backend request is that dracula.sh loses
everything after the space.

Q: Why does the fixed-location end up as "San"?
A: In dracula.sh the fixed-location is not wrapped in quotes when
embedded in the status-right string.

A: In weather_wrapper.sh the call to weather.sh does not wrap the
fixed-location argument with quotes.

Q: When these are fixed why do we get a broken link?
A: Since we are calling a web service using a url, we need to escape
the spaces by changing them to %20
@ethancedwards8
Copy link
Member

Thank you for contribution! Funny bug, glad you caught it.

@ethancedwards8 ethancedwards8 merged commit 6dd08eb into dracula:master Jan 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants