CabinJS/grunt-pages — pull request #38 by justinhelmer (2013-08-29 04:51:27+00:00)
Title: more comprehensive safe URL formatting

When I was writing blog posts, I noticed that the regex that generates the URL is not comprehensive enough. It doesn't handle edge cases.

I assume grunt-pages should have most rock-solid regex, but without adding extra caveat logic to go to the extreme (i.e. stackoverflow's).

This is the most rock solid regex I know; very similar to many solutions out there.

*Note that this commit only addresses URIs, and does not consider internationalization requirements i.e. IRIs (RFC 3987 - http://www.faqs.org/rfcs/rfc3987.html)