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

[V2 General] fixed lmgtfy when search term contains a plus #1868

Merged
merged 1 commit into from
Aug 13, 2018
Merged

[V2 General] fixed lmgtfy when search term contains a plus #1868

merged 1 commit into from
Aug 13, 2018

Conversation

ToxicFrazzles
Copy link

A plus in an equation is interpreted as a space by https://lmgtfy.com which breaks the equation. Fixed by escaping plus characters in the search terms.

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Before spaces are replaced with pluses replace pluses with "%2B" (the URL escaped plus) to allow search terms containing a plus such as equations to be properly processed by the web page linked to.

A plus in an equation is interpreted as a space by https://lmgtfy.com which breaks the equation. Fixed by escaping plus characters in the search terms.
@CDWimmer
Copy link

Ran into this problem myself and this works to fix it, would recommend including for sure
Beats copying into notepad and ctrl-H replacing all the + with %2B before running the command

@Tobotimus Tobotimus changed the title fixed lmgtfy when search term contains a plus [V2 General] fixed lmgtfy when search term contains a plus Jun 25, 2018
@Redjumpman
Copy link
Member

This fix does work, the same bug exists in the V3 version of lmgtfy. I'm going to open a PR for this in V3 too.

@Tobotimus Tobotimus merged commit 15bf5c5 into Cog-Creators:develop Aug 13, 2018
@Tobotimus
Copy link
Member

Thanks for the patch @ToxicFrazzles, we're sorry it took so long!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants