UglifyHtml

Ugly small lib to convert HTML markup to ugly HTML markup.

Things such these happen…

<strong>some bold text</strong>

to

<span style="font-weight: bold"></span>

-

<em>some bold text</em>

to

<span style="font-style: italic"></span>

-

<ul>
  <li>Item 1</li>
  <li>Item 2
    <ul>
      <li>Item 1 List 2</li>
    </ul>
  </li>
</ul>

to

<ul>
  <li>Item 1</li>
  <li>Item 2
    <ul>
      <li>Item 1 List 2</li>
    </ul>
  </li>
</ul>

Why?

  • Put it inside a nicEdit Wysiwyg editor.

With

  • Hpricot

  • Hpricot extensions Elem::Trav::add_style, Elem::Trav::has_style?, Elem::change_tag!

Get it

gem install zevarito-uglify_html

License

Authors

Alvaro Gil (zevarito)

License

MIT (Check LICENSE for details)