Skip to content

Wrong escape in HTML comments #87

Description

@nechutny

Hi,

when i have "-" in url (eg. http://localhost/repo-branch/), then latte generate wrong urls in HTML comment. This is important, because comments are used for including JS for IE etc. It add space after each "-". I think, that correct behavior is add space only to "-->" sequence. Because now this latte code produce wrong output.

<!--[if lt IE 9]>
    <script src="{$baseUri}/vendor/html5shiv/dist/html5shiv-printshiv.js"></script>
<![endif]-->


<!--[if lt IE 9]>
    <script src="http://localhost/fdv- master/vendor/html5shiv/dist/html5shiv-printshiv.js"></script>
<![endif]-->

Workaround is |noescape, but it is potential security hole.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions