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 03:17:22 UTC

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

    [ 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