@@ -141,13 +141,17 @@ checkUrl filePath url
141 | hasProtocol url = skip "Unknown protocol, skipping"
141 | hasProtocol url = skip "Unknown protocol, skipping"
142 | otherwise = checkInternalUrl filePath url
142 | otherwise = checkInternalUrl filePath url
144− hasProtocol = all (`elem` validProtoChars) . takeWhile (/= ':')
145 validProtoChars = ['A'..'Z'] ++ ['a'..'z'] ++ ['0'..'9'] ++ "+-."
144 validProtoChars = ['A'..'Z'] ++ ['a'..'z'] ++ ['0'..'9'] ++ "+-."
145+ hasProtocol str = case break (== ':') str of
146+ (proto, ':' : _) -> all (`elem` validProtoChars) proto
147--------------------------------------------------------------------------------
150--------------------------------------------------------------------------------
148ok :: String -> Checker ()
151ok :: String -> Checker ()
149ok _ = tell $ mempty {checkerOk = 1}
152ok _ = tell $ mempty {checkerOk = 1}
151--------------------------------------------------------------------------------
155--------------------------------------------------------------------------------
152skip :: String -> Checker ()
156skip :: String -> Checker ()
153skip reason = do
157skip reason = do