haskell - How to transform some Blaze `Html` before rendering it with Yesod? -


i have html entered user displayed in yesod template. transform html, stripping out style attributes before gets rendered, cannot find out how.

if template contains #{ html } can pass html value through function writing #{ transform html }, if transform function has signature: transform :: html -> html html type defined blaze-html here. problem see blaze not seem expose functionalities useful in order walk html tree, or descendents of given html. strategies suggest? should try blaze internals?

i not sure whether should considered purely issue blaze. transforming html elements not 1 of main use cases of blaze, problem needs tackled in context of rendering yesod

you have render text or bytestring first, blaze provides no means of analyzing content. can process data library html-conduit or tagsoup (which xss-sanitize does).


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -