From 85605fcbabdb0bd400e1acc90a6576241b48f5d1 Mon Sep 17 00:00:00 2001 From: vi Date: Mon, 11 Aug 2014 05:42:03 +0800 Subject: [PATCH] Fixed target parser. --- src/Data/HTTPSEverywhere/Rules/Internal/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/HTTPSEverywhere/Rules/Internal/Parser.hs b/src/Data/HTTPSEverywhere/Rules/Internal/Parser.hs index f46c035..490e33b 100644 --- a/src/Data/HTTPSEverywhere/Rules/Internal/Parser.hs +++ b/src/Data/HTTPSEverywhere/Rules/Internal/Parser.hs @@ -30,7 +30,7 @@ parseRuleSets = catMaybes <$$> toListOf $ html . allNamed (only "ruleset") . to parseRuleSet :: Element -> Maybe RuleSet parseRuleSet xml = xml ^. attr "name" <&> \ruleSetName -> do - let ruleSetTargets = xml ^.. allNamed (only "target") . attr "name" . _Just . to parseTarget + let ruleSetTargets = xml ^.. allNamed (only "target") . attr "host" . _Just . to parseTarget ruleSetRules = xml ^.. allNamed (only "rule") . to parseRule & catMaybes ruleSetExclusions = xml ^.. allNamed (only "exclusion") . attr "pattern" . _Just . to parseExclusion & catMaybes ruleSetCookieRules = xml ^.. allNamed (only "securecookie") . to parseCookieRule & catMaybes