Skip to content Skip to sidebar Skip to footer
Showing posts with the label Ruby

How To Parse Xml With Nokogiri Without Losing Html Entities?

If you look at the output below in the after section ruby is removing all the html entities. How to… Read more How To Parse Xml With Nokogiri Without Losing Html Entities?

Embedded Google Maps In Rails Not Responsive

I'm trying to embed Google Maps into my Ruby on Rails website. I am able to search places on t… Read more Embedded Google Maps In Rails Not Responsive

How To Sanitize Html String Except Image Url?

I'm trying to sanitize an html string, but I want to whitelist image urls. My code: ActionView:… Read more How To Sanitize Html String Except Image Url?

How To "link_to" Full Path In Rails 4?

This is the code i have Solution 1: To get the full URL, use gig_url(@gig) instead of gig_path… Read more How To "link_to" Full Path In Rails 4?

How To Make Nokogiri Transparently Return Un/encoded Html Entities Untouched?

How can I use Nokogiri with having html entities (like German umlauts) untouched? I.e.: # this is f… Read more How To Make Nokogiri Transparently Return Un/encoded Html Entities Untouched?

Strip Text From Html Document Using Ruby

There are lots of examples of how to strip HTML tags from a document using Ruby, Hpricot and Nokogi… Read more Strip Text From Html Document Using Ruby