escape library provides several HTML/URI/shell escaping functions for Ruby.