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

How To Insert A Block Every Several Div With Haml?

I want to insert a div.row every three blocks in order to wrap three span together for the followin… Read more How To Insert A Block Every Several Div With Haml?

Extract Data From Html Table With Mechanize

First of all, here is the sample html table : Kangchenjunga 8,586m Solution 1: More succint v… Read more Extract Data From Html Table With Mechanize

How To Save Complete Html Page With Frames/iframes Included?

During the web scraping I want to save current page's html to a file for later debug. browser.h… Read more How To Save Complete Html Page With Frames/iframes Included?

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?

Save All User Entries From Html Text Built Off A Loop Using Ruby And Sinatra

I am creating a web page that displays a table. It also has four columns at the end of each record … Read more Save All User Entries From Html Text Built Off A Loop Using Ruby And Sinatra

Repairing Invalid Html With Nokogiri (removing Invalid Tags)

I'm trying to tidy some retrieved HTML using the tidy-ext gem. However, it fails when the HTML … Read more Repairing Invalid Html With Nokogiri (removing Invalid Tags)