[ 
https://issues.apache.org/jira/browse/SLING-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-2794.
-------------------------------------
    Resolution: Won't Fix

> Sling._replaceExtension() Javascript function tries to replace the path 
> extension twice
> ---------------------------------------------------------------------------------------
>
>                 Key: SLING-2794
>                 URL: https://issues.apache.org/jira/browse/SLING-2794
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Post 2.1.0
>         Environment: org.apache.sling.launchpad-6-standalone.jar
>            Reporter: Filippo Del Trappeto
>            Priority: Minor
>
> The Sling._replaceExtension() Javascript function, in /system/sling.js , 
> tries to replace the path extension twice, so the URL 
> "http://192.168.1.2/content/blog/mypost.html"; becomes something like 
> "http://192.168.1.json";, causing problems in the "46 lines blog example".
> Firebug shows me:
> {code}
>  /** Replace extension in a path */
> Sling._replaceExtension = function(path,newExtension) {
> var i = path.lastIndexOf(".");
> if(i >= 0) path = path.substring(0,i);
> i = path.lastIndexOf(".");
> if(i >= 0) path = path.substring(0,i);
> return path + newExtension;
> } 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to