diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-01-08 04:53:01 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-01-08 04:53:01 +0000 |
commit | 2df432dc60b104a63bd32bc10662303313b453f9 (patch) | |
tree | 6dafc090873f48e1594eb3c358783c97b5bcb070 /Text/Pandoc/Readers | |
parent | 71e508f98a3b8712e1feadce455116e86340bd24 (diff) | |
download | pandoc-2df432dc60b104a63bd32bc10662303313b453f9.tar.gz |
Changed comment used to replace unsafe HTML if sanitize-html option
selected.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1178 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Readers')
-rw-r--r-- | Text/Pandoc/Readers/HTML.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Text/Pandoc/Readers/HTML.hs b/Text/Pandoc/Readers/HTML.hs index 42a085f63..7c90b14b8 100644 --- a/Text/Pandoc/Readers/HTML.hs +++ b/Text/Pandoc/Readers/HTML.hs @@ -159,7 +159,7 @@ anyHtmlTag = try $ do concatMap (\(_, _, raw) -> (' ':raw)) attribs ++ ender' ++ ">" unsanitary <- unsanitaryTag tag if unsanitary - then return $ "<!-- unsafe tag " ++ result ++ " omitted -->" + then return $ "<!-- unsafe HTML removed -->" else return result anyHtmlEndTag = try $ do @@ -173,7 +173,7 @@ anyHtmlEndTag = try $ do let result = "</" ++ tag ++ ">" unsanitary <- unsanitaryTag tag if unsanitary - then return $ "<!-- unsafe tag " ++ result ++ " omitted -->" + then return $ "<!-- unsafe HTML removed -->" else return result htmlTag :: String -> GenParser Char ParserState (String, [(String, String)]) @@ -255,7 +255,7 @@ htmlScript = try $ do rest <- manyTill anyChar (htmlEndTag "script") st <- getState if stateSanitizeHTML st && not ("script" `elem` sanitaryTags) - then return "<!-- unsafe script omitted -->" + then return "<!-- unsafe HTML removed -->" else return $ open ++ rest ++ "</script>" -- | Parses material between style tags. @@ -265,7 +265,7 @@ htmlStyle = try $ do rest <- manyTill anyChar (htmlEndTag "style") st <- getState if stateSanitizeHTML st && not ("style" `elem` sanitaryTags) - then return "<!-- unsafe style omitted -->" + then return "<!-- unsafe HTML removed -->" else return $ open ++ rest ++ "</style>" htmlBlockElement = choice [ htmlScript, htmlStyle, htmlComment, xmlDec, definition ] |