how to remove html element's style attribute using Hpricot?

Posted by shewei on Stack Overflow See other posts from Stack Overflow or by shewei
Published on 2010-06-18T02:31:05Z Indexed on 2010/06/18 2:53 UTC
Read the original article Hit count: 270

Filed under:
|
|

like this:

<p style="font-size: 12pt;">
  Hello world
  <span style="font-weight: bold;">just do it</span>
</p>

I want to remove every element's "style" attribute. I want the result like this:

<p>Hello world <span>just do it</span></p>

how to do this using hpricot?

thanks.

© Stack Overflow or respective owner

Related posts about html

Related posts about ruby