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

Glen Mazza updated ROL-2066:
----------------------------
    Summary: Comment URLs using https:// not saving properly in Gaurav theme  
(was: Commentors can't leave a comment using URL begins with https:// in Gaurav 
theme)

> Comment URLs using https:// not saving properly in Gaurav theme
> ---------------------------------------------------------------
>
>                 Key: ROL-2066
>                 URL: https://issues.apache.org/jira/browse/ROL-2066
>             Project: Apache Roller
>          Issue Type: Bug
>          Components: Themes and Macros
>    Affects Versions: 5.1.1
>            Reporter: Kohei Nozaki
>            Assignee: David Johnson
>            Priority: Trivial
>             Fix For: 5.1.2
>
>         Attachments: ROL-2066.patch, Screen Shot 2015-02-28 at 12.52.03.png, 
> Screen Shot 2015-02-28 at 12.52.17.png
>
>
> entry.vm in Gaurav theme has a convenient JavaScript method which named 
> fixURL(). it's binded in the onsubmit event handler in comment form and it 
> prepends http:// to commentor's URL if one has no scheme in the URL. for 
> example it converts the URL which a commentor entered as follows:
> {noformat}
> www.example.com => http://www.example.com
> {noformat}
> The code of the method is following:
> {code}
> function fixURL(theForm) {
>     if (theForm.url.value != "" &&
>         theForm.url.value.indexOf("http://";) == -1) { //prepend http://
>         theForm.url.value = "http://"+theForm.url.value;
>     }
>     saveUserInformation(theForm);
> }
> {code}
> It works well for most cases, but not for a URL which begins with https:// or 
> some other schemes (e.g. ftp://). it goes wrong with such URL as follows:
> {noformat}
> https://www.example.com => http://https://www.example.com
> {noformat}
> I think current implementation of fixURL() which is simply searching 
> "http://"; is not enough.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to