hasgeek / hasjob

Hasjob, the Hasgeek job board
https://hasjob.co
GNU Affero General Public License v3.0
237 stars 80 forks source link

Some URLs are missing a character #625

Closed asdofindia closed 3 years ago

asdofindia commented 3 years ago

Eg: image https://hasjob.co/whitehatjr.com/7zgax - See the hitehatjr.com in the header

Similarly, https://hasjob.co/weqtechnologies.com/gnho9 has become eqtechnologies

I looked at the cleanurl function but that seems correct to me. Can't figure out who is off by one and why.

jace commented 3 years ago

We rewrote the cleanurl filter to be a bit more robust, put it in the shared library, and goofed up on lstrip, which takes characters, not substrings. It was failing on URLs that begin with w, but the tests only had variations of example.com URLs. Fixed it there.