[TYPO3-english] TemplaVoilà changes tags
Jigal van Hemert
jigal.van.hemert at typo3.org
Fri Aug 8 13:36:49 CEST 2014
Hi,
On 8-8-2014 0:37, Mathias Hübscher wrote:
> The header is not the problem. I've fixed the header manually in
> Typoscript because this is a known issue of TemplaVoilá. There are two
> other sections with the condition (Around the Slider and before the
> </body> tag)
Okay, I initially saw the first one and expected only the one in the
header to exist.
> I still cannot see why the conditions aren't normal. They work without
> problems on browserstack.com. How they should look?
The fact that something works in a browser doesn't mean it's correct.
Browsers are rather forgiving and try to repair as much as they can.
Conditional comments are meant to be comments. Everything inside must be
inside a comment. An HTML comment starts with !-- and ends with --; this
is inclosed in <> to make it a tag:
<!--[if (gt IE 9)|(!IE)]>
<script type="text/javascript">
onInit();
</script>
<![endif]-->
In your version the first and the last line were comments on their own:
<!--[if gt IE 9|!(IE)]><!-->
<script>
onInit();
</script>
<!--<![endif]-->
The first line begins with <!-- then a lot of comment info and ends with
--> The script part isn't actually a comment.
It may be that any post processing (XHTML cleaning is on?) was confused
here. It detected the beginning of a conditional comment (<!--[if) and
started doing some processing.
I think it's worth a try to use the correct format for conditional
comments and see if the result is processed correctly.
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list