Commit c693ce30 authored by Thomas Peiselt's avatar Thomas Peiselt

markup removal improvements.

it's possible to have some content between `<span class=name>` and `<0>`
so separating the expressions to handle this case.
parent 972450cd
......@@ -272,8 +272,10 @@ link = printf "<a target='_blank' href='%s'>%s</a>"
removeMarkup :: String -> String
removeMarkup s = T.unpack $ List.foldl (flip ($)) (T.pack s) replaceAll
where replacements :: [ (T.Text, T.Text) ]
replacements = [ ( "<span class=name><0>", "" )
, ( "</0></span>", "" )
replacements = [ ( "<span class=name>", "" )
, ( "</span>", "" )
, ( "<0>", "" )
, ( "</0>", "" )
, ( "&gt;", ">" )
, ( "&lt;", "<" )
, ( "<b>", "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment