[xmonad] XMonad.Actions.Search: Issue with escaped URL

Brandon Allbery allbery.b at gmail.com
Fri Jun 12 14:24:54 UTC 2020


Strictly speaking that's an HTTP protocol violation, so it may be
being enforced somewhere in the network-uri package or an HTTP package
over it but under xmonad. (The common usage of ~ is also a violation,
which leads to %7E escapes.)

On 6/12/20, Christian Heinrich <com-xmonad at gladbachcity.de> wrote:
> Hi everyone,
>
> I've started to use XMonad.Actions.Search and I'm trying to define my own
> SearchEngine as follows:
>
>> searchFunc :: String -> String
>> searchFunc s = "https://de.pons.com/übersetzung/französisch-deutsch/" ++
>> (escape s)
>> pons = searchEngineF "pons" searchFunc
>
> The german umlauts ü and ö are actually part of the URL. According to the
> documentation,
> searchEngineF should not handle any escaping (unlike searchEngine), but the
> URL that is opened for "a" is
>
> https://de.pons.com/%C3%83%C2%BCbersetzung/franz%C3%83%C2%B6sisch-deutsch/a
>
> I can't find what I'm doing wrong even when looking at the source.
>
> Could anyone point out to me how to open that URL without escaping anything?
> I'm just surprised that
> the base-URL is escaped as well, and not just the argument. I'm pretty new
> to Haskell and would be
> grateful for any hint.
>
> Thanks!
>
> Christian
>


-- 
brandon s allbery kf8nh
allbery.b at gmail.com


More information about the xmonad mailing list