You may have to do this for all browsers eventually. The URI spec says Safari 
is right. 

On Aug 25, 2011, at 13:24, [email protected] wrote:

> Author: pbr
> Date: 2011-08-25 10:24:36 -0700 (Thu, 25 Aug 2011)
> New Revision: 19403
> 
> Modified:
>   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> Log:
> Change philip-20110825-b47 by philip@PHILIP-I7 on 2011-08-25 13:15:53 EDT
>    in /cygdrive/c/clients/laszlo/svn/openlaszlo/trunk
>    for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Fix for relative resource links in Safari
> 
> New Features:
> 
> Bugs Fixed: LPP-10057
> 
> Technical Reviewer: (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
> 
> Documentation:
> 
> Release Notes:
> 
> Overview:
> 
> 
> Details:
> When a resource is specified as 'http:../...', this link is passed to the 
> browser to resolve. In Safari 5.1, it interprets this as an absolute link 
> rather than a link relative to the current page. To solution is to strip off 
> 'http:' from the link for relative links. Absolute links (http://...) are 
> left untouched.
> 
> Tests:
> See test case in jira report. This works in all browsers.
> smoketest passes.
> 
> Files:
> M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> M       WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/philip-20110825-b47.tar 
> 
> 
> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> ===================================================================
> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js    2011-08-25 
> 17:22:56 UTC (rev 19402)
> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js    2011-08-25 
> 17:24:36 UTC (rev 19403)
> @@ -1311,6 +1311,13 @@
>         this.unload();
>         return;
>     }
> +
> +    // Modify the url to strip a leading http: reference (but not http://)
> +    // See LPP-10057
> +    if (url.indexOf('http:') == 0 && url.indexOf('http://') != 0) {
> +        url = url.substring(5); // Strip off http:
> +    }
> +
>     if (usecache == 'reset') {
>         usecache = false;
>     } else if (usecache != true){
> 
> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> ===================================================================
> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as    2011-08-25 
> 17:22:56 UTC (rev 19402)
> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as    2011-08-25 
> 17:24:36 UTC (rev 19403)
> @@ -674,6 +674,11 @@
>             }
>             loadurl = lz.Browser.makeProxiedURL(params);
>         }
> +        else {
> +            // Safari does not like http:/path references. (LPP-10057)
> +            if (loadurl.indexOf('http:') == 0 && loadurl.indexOf('http://') 
> != 0)
> +                loadurl = loadurl.substring(5); // Strip off http:
> +        }
>         return loadurl;
>     }
> 
> 
> 
> _______________________________________________
> Laszlo-checkins mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to