bt.san...@gmail.com
unread,Nov 5, 2009, 9:58:58 AM11/5/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bangal...@googlegroups.com, ruby-on-rails-programming-with-passion, rubyonra...@googlegroups.com
hi ,
I have used Sanitize.clean() to clean up html tags, but I want to preserve some of them, For that I have given, return Sanitize.clean(soup_string.to_s, :elements => ['div','p','span','table','tr','th','td','blockquote', 'br', 'cite', 'code', 'dd', 'dl', 'dt','em','i', 'li', 'ol','pre', 'q', 'small', 'strike','strong', 'sub','sup', 'u', 'ul','tbody','center']) .. But the problem is that I want to preserve right justification also, where i cannot define the custom style as <right></right> is not a valid tag...
For center justification to preserve I have given... tag.contents = ['<center>'+tag.contents.to_s+'</center>'] if (tag['style'] =~ /text-align:center/) where it recognizes center, But how to allow the right justification, please help me.
Thanks,
Santosh