laravel/laravel — pull request #1310 by rk (2012-10-04 20:01:33+00:00)
Title: Asset support for protocol-less URLs

This pull request addresses issue #1217.

First, I apologize for not completely testing my last pull request. This one I've not just tested, but I'm actively developing an application that's using this bug-fix. But I promise to do my best not to introduce bugs now and in the future.

Anyway, there are 2 primary changes:

1. Asset_Container->asset() should not validate the URL because calling HTML::script() and HTML::style() both validate URLs implicitly by calling URL::to_asset() on the url. By removing this duplication we can validate once and have no reimplementation to worry about altering functionality later.

2. Extending URL::valid() to support a protocol-less URL by prepending `http:` before running filter_var on it.