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

Filippo Del Trappeto updated SLING-2794:
----------------------------------------

          Environment: org.apache.sling.launchpad-6-standalone.jar
    Affects Version/s: Servlets Post 2.1.0
    
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to