Skip to content

MaryBecky/xhtmlize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xhtmlize
==========

Rails helper to XHTML-ize chunks of user submitted HTML. For the standardista in all of us.

>> html = "<div><p>foo</p><a href='http://foo.com'>foo"
=> "<div><p>foo</p><a href='http://foo.com'>foo"
>> xhtmlize(html)
=> "<div><p>foo</p><a href=\"http://foo.com\">foo</a></div>"

Also comes with an ActiveRecord class method to automatically xhtmlize attributes in an after_save callback.

class Comment < ActiveRecord::Base
  xhtmlize :title, :content
end

About

Rails helper to XHTML-ize chunks of user submitted HTML. For the standardista in all of us

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 100.0%