cakephp/cakephp — pull request #680 by rycarus (2012-05-31 00:59:56+00:00)
Title: Correctly identify absolute paths in HTMLHelper

http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html
states that absolute paths can be used for CSS and JS files. The code only
checks for the presence of '//' in the path to determine if a path is absolute.
This patch adds checking the first character of the path for '/' to determine
if a path is an absolute path. This is necessary if your CakePHP installation
isn't at the root directory. For example, if your site lived at
/this/is/the/webroot and you wanted to include a script file located at
/some/other/directory/script.js then the HTMLHelper would incorrectly output
/this/is/the/webroot/some/other/directory/script.js

Example View code:
Html->script('/some/other/directory/script.js'); ?>
Works correctly if site is on the root of the domain, incorrectly if it is not.