[TYPO3-mvc] RFC: New comments in FLUID

"Christian Müller (FLOW3 Team)" christian.mueller at typo3.org
Thu Mar 1 09:18:25 CET 2012


Hi Jigal,

thanks for checking that, I wasn't totally sure but didn't look it up. I 
would agree that we should at least try to avoid anything not standards 
conforming. Maybe the suggestion from Ralf-Rene is a good idea:

<!--## ##-->

Only problem then could be if someone (for whatever reason) needs to mix 
classic TYPO3 templating with Fluid, because then you must watch to 
leave spaces between the comment open/close and the ### if you put a 
subpart in comments, but maybe that is an edge case.

Cheers,
Christian

On 29/02/12 21:21, Jigal van Hemert wrote:
> Hi,
>
> On 28-2-2012 15:16, Michael Knoll wrote:
>> just wanted to ask, what you think about the following idea on how to
>> add comments like <!--- ... ---> in Fluid template engine:
>
> That would make the Fluid template not well-formed in XML [1]:
>
> Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
>
> It will also be incorrect in other SGML documents [2] such as (X)HTML:
>
> A comment declaration consists of `<!' followed by zero or more comments
> followed by `>'. Each comment starts with `--' and includes all text up
> to and including the next occurrence of `--'.
>
> So, this special comment will be formed of:
> <! : tag open
> -- : comment begin
> .... : comment contents
> -- : comment end
> - : extra dash
>  > : tag close
>
> Also HTML5 doesn't allow it [3]:
>
> Comments must start with the four character sequence U+003C LESS-THAN
> SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS
> (<!--). Following this sequence, the comment may have text, with the
> additional restriction that the text must not start with a single U+003E
> GREATER-THAN SIGN character (>), nor start with a U+002D HYPHEN-MINUS
> character (-) followed by a U+003E GREATER-THAN SIGN (>) character, nor
> contain two consecutive U+002D HYPHEN-MINUS characters (--), nor end
> with a U+002D HYPHEN-MINUS character (-). Finally, the comment must be
> ended by the three character sequence U+002D HYPHEN-MINUS, U+002D
> HYPHEN-MINUS, U+003E GREATER-THAN SIGN (-->).
>
> The special comment has text which ends with a hyphen-minus followed by
> closing '-->'.
>
> [1] http://www.w3.org/TR/REC-xml/#sec-comments
> [2] http://www.w3.org/MarkUp/html-spec/html-spec_3.html#SEC3.2.5
> [3] http://www.w3.org/TR/html5/syntax.html#comments
>



More information about the TYPO3-project-typo3v4mvc mailing list