joomla/joomla-platform — pull request #623 by elinw (2011-12-09 10:55:48+00:00)
Title: Add url filtering, improve url field, update  tests to reflect changes.

This adds a url filter to the existing filters in Jform. The filter requires that a url have a protocol. If a protocol is not present it uses http://. It also updates the tests to include tests of the url filtering option. This filter can optionally be used with the url field type or the url rule or both, but this is not required.

As part of this change, the url field is built out and incorporates a new element, relative. By default (with the exception of some educated guessing based on the host and index.php) the url filter assumes that a url without a protocol is an external url that is only missing a protocol. If the relative element is used, the filter assumes that a url without a protocol is relative to the local root.