@@ -37,11 +37,13 @@ normalizeDescription :: String -> String
37normalizeDescription desc
37normalizeDescription desc
38 | null desc = []
38 | null desc = []
39 | last desc == '.' && length (filter ('.'==) desc) == 1 = normalizeDescription (reverse (tail (reverse desc)))
39 | last desc == '.' && length (filter ('.'==) desc) == 1 = normalizeDescription (reverse (tail (reverse desc)))
40− | otherwise = unwords (words desc) >>= quote
40+ | otherwise = quote (unwords (words desc))
42−quote :: Char -> [Char]
42+quote :: String -> String
43−quote '"' = "\\\""
43+quote ('\\':c:cs) = '\\' : c : quote cs
44−quote c = [c]
44+quote ('"':cs) = '\\' : '"' : quote cs
45+quote (c:cs) = c : quote cs
46normalizeList :: [String] -> [String]
48normalizeList :: [String] -> [String]
47normalizeList = nub . sortBy (\x y -> compare (map toLower x) (map toLower y))
49normalizeList = nub . sortBy (\x y -> compare (map toLower x) (map toLower y))