|
Filter all elements except b, convert filtered elements to space December 13, 2011 01:26PM |
Registered: 1 year ago Posts: 1 |
I'm having a small issue where I have minified HTML, that I now need to strip out all tags except for the 'b' tag when it has the class 'red'. I am able to pretty easily do this with this config
'HTML.Allowed', 'b[class]'
'Attr.AllowedClasses', 'red'
Since my HTML text is minified, the output looks something like this
::input:: <p><ul><li>item</li><li><b class="red">item2</li></ul></p> ::output:: item<b class="red">item2</b> When when rendered, looks like, "itemitem2"
Since them items are block level elements, is there a way to add a space between them? So the output would look like,
::output:: item <b class="red">item2</b>
|
Re: Filter all elements except b, convert filtered elements to space December 13, 2011 03:16PM |
Admin Registered: 6 years ago Posts: 2,640 |