FIX: Search for whole URLs wasn't working. (PR #10190)

GitHub

We should probably use another string delimiter :wink:

      expect(Search.execute('"test post with a URL"').posts).to eq([post])
      expect(Search.execute('"https://some.site.com/search?q=test.test.test"').posts).to eq([post])
      expect(Search.execute('" with a URL https://some.site.com/search?q=test.test.test"').posts).to eq([post])

or, the more “in-the-face”

      expect(Search.execute(%{"test post with a URL"}).posts).to eq([post])
      expect(Search.execute(%{"https://some.site.com/search?q=test.test.test"}).posts).to eq([post])
      expect(Search.execute(%{" with a URL https://some.site.com/search?q=test.test.test"}).posts).to eq([post])

looks pretty safe to me … merge at will

Merged in https://github.com/discourse/discourse/commit/5c31216aea5f872cd749ee6f59586435fa9d859c