You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "SebbASF (JIRA)" <ji...@codehaus.org> on 2011/02/14 02:42:22 UTC

[jira] Created: (DOXIASITETOOLS-52) default-site.vm incorrectly flags some URLs as external

default-site.vm incorrectly flags some URLs as external
-------------------------------------------------------

                 Key: DOXIASITETOOLS-52
                 URL: http://jira.codehaus.org/browse/DOXIASITETOOLS-52
             Project: Maven Doxia Sitetools
          Issue Type: Bug
          Components: Site renderer
    Affects Versions: 1.1.4
            Reporter: SebbASF


The default-site.vm has the following code:

{code}
  #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https") ) )
{code}

This is wrong, as it assumes that the following URL is external:

httpcore/index.html

[In fact the check for "https" is currently redundant, as https starts with http!]

The code should be:

{code}
  #if ( ( $href.toLowerCase().startsWith("http:") || $href.toLowerCase().startsWith("https:") ) )
{code}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DOXIASITETOOLS-52) default-site.vm incorrectly flags some URLs as external

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/DOXIASITETOOLS-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed DOXIASITETOOLS-52.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.5
         Assignee: Lukas Theussl

Fixed in [r1070675|http://svn.apache.org/viewvc?view=revision&revision=1070675]

I have adjusted the test for external URIs so it corresponds to the doxia definition, see http://maven.apache.org/doxia/doxia/doxia-core/apidocs/org/apache/maven/doxia/util/DoxiaUtils.html#isExternalLink(java.lang.String).

> default-site.vm incorrectly flags some URLs as external
> -------------------------------------------------------
>
>                 Key: DOXIASITETOOLS-52
>                 URL: http://jira.codehaus.org/browse/DOXIASITETOOLS-52
>             Project: Maven Doxia Sitetools
>          Issue Type: Bug
>          Components: Site renderer
>    Affects Versions: 1.1.4
>            Reporter: SebbASF
>            Assignee: Lukas Theussl
>             Fix For: 1.1.5
>
>
> The default-site.vm has the following code:
> {code}
>   #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https") ) )
> {code}
> This is wrong, as it assumes that the following URL is external:
> httpcore/index.html
> [In fact the check for "https" is currently redundant, as https starts with http!]
> The code should be:
> {code}
>   #if ( ( $href.toLowerCase().startsWith("http:") || $href.toLowerCase().startsWith("https:") ) )
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DOXIASITETOOLS-52) default-site.vm incorrectly flags some URLs as external

Posted by "SebbASF (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIASITETOOLS-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255909#action_255909 ] 

SebbASF commented on DOXIASITETOOLS-52:
---------------------------------------

Note: There are several other instances of the same faulty tests in the file.

In all cases, .startsWith("http") should be replaced by .startsWith("http:"), similarly for startsWith("https").

> default-site.vm incorrectly flags some URLs as external
> -------------------------------------------------------
>
>                 Key: DOXIASITETOOLS-52
>                 URL: http://jira.codehaus.org/browse/DOXIASITETOOLS-52
>             Project: Maven Doxia Sitetools
>          Issue Type: Bug
>          Components: Site renderer
>    Affects Versions: 1.1.4
>            Reporter: SebbASF
>
> The default-site.vm has the following code:
> {code}
>   #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https") ) )
> {code}
> This is wrong, as it assumes that the following URL is external:
> httpcore/index.html
> [In fact the check for "https" is currently redundant, as https starts with http!]
> The code should be:
> {code}
>   #if ( ( $href.toLowerCase().startsWith("http:") || $href.toLowerCase().startsWith("https:") ) )
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira