mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
encode string of bytes not list of chars
This commit is contained in:
parent
c6178cacd2
commit
e708caf2ac
@ -56,7 +56,7 @@ module XMonad.Actions.Search ( -- * Usage
|
|||||||
-- $tip
|
-- $tip
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Codec.Binary.UTF8.String (encodeString)
|
import Codec.Binary.UTF8.String (encode)
|
||||||
import Data.Char (isAlphaNum, isAscii)
|
import Data.Char (isAlphaNum, isAscii)
|
||||||
import Data.List (isPrefixOf)
|
import Data.List (isPrefixOf)
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
@ -208,7 +208,7 @@ escape = concatMap escapeURIChar
|
|||||||
|
|
||||||
escapeURIChar :: Char -> String
|
escapeURIChar :: Char -> String
|
||||||
escapeURIChar c | isAscii c && isAlphaNum c = [c]
|
escapeURIChar c | isAscii c && isAlphaNum c = [c]
|
||||||
| otherwise = concatMap (printf "%%%02X") $ encodeString [c]
|
| otherwise = concatMap (printf "%%%02X") $ encode [c]
|
||||||
|
|
||||||
type Browser = FilePath
|
type Browser = FilePath
|
||||||
type Query = String
|
type Query = String
|
||||||
|
Loading…
x
Reference in New Issue
Block a user