At the moment relative paths without "../" like "images/image.jpg" or with multiple "../" like "../../images/image.jpg" are not resolved correctly.
Looking into the Scaffold_Extension_AbsoluteUrls class I've discovered few issues.
up_directory should not be called in resolve_absolute_path or it should do nothing unless "../" exists in the path. As a quick solution "if (!$n) return $path;" should be the first line in up_directory.
as $path has a trailing slash the last element of $explode is an empty string. So we want to remove $n + 1 elements from the end of $explode: $exploded = array_slice($exploded, 0, (count($exploded) - $n - 1));
for consistency, up_directory should return a path maintaining the trailing slash. So after slicing the $exploded array it should add an empty element ($exploded[] = '';) so that implode will add that trailing slash.
when resolve_absolute_path returns the path it should replace "../" with empty string not "/".
After making this modifications I've run tests for each case and it works.
At the moment relative paths without "../" like "images/image.jpg" or with multiple "../" like "../../images/image.jpg" are not resolved correctly.
Looking into the Scaffold_Extension_AbsoluteUrls class I've discovered few issues.
After making this modifications I've run tests for each case and it works.
Best regards!