Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content type HTML should be allowed inside of HTMLCOMMENT type. #136

Closed
vhenzl opened this issue Sep 24, 2016 · 2 comments
Closed

Content type HTML should be allowed inside of HTMLCOMMENT type. #136

vhenzl opened this issue Sep 24, 2016 · 2 comments

Comments

@vhenzl
Copy link

@vhenzl vhenzl commented Sep 24, 2016

With Latte 2.4 I've run into problems with blocks inside of (conditional) HTML comments.

Let's say, I have @layout.latte template like this:

<body>
  {include content}
  <!--[if IE]>
    {block onlyIE}{/block}
  <![endif]-->
</body>

If I override onlyIE block in a page template I get User Warning: Overridden block onlyIE with content type HTMLCOMMENT by incompatible type HTML.
Also, I get similar warning if I try to include a block: Including block onlyIE with content type HTML into incompatible type HTMLCOMMENT.

IMO, there isn't any reason this shouldn't be allowed. Is it?

@dg

This comment has been minimized.

Copy link
Member

@dg dg commented Sep 26, 2016

Reason is that in comments is differently escaped character -.

(btw conditional comments are not supported since IE 10)

@dg dg closed this in 875d605 Sep 26, 2016
@vhenzl

This comment has been minimized.

Copy link
Author

@vhenzl vhenzl commented Sep 28, 2016

Oh, I didn't know about IE 10. But that was just an example. In fact, I need it for more obscure conditions as [if mso] in e-mail templates. Anyway, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.