[TYPO3-core] Gremlin #1292: xhtml_cleaning cleans HTML commentswhich is not wanted in any case
Sebastian Kurfuerst
sebastian at garbage-group.de
Mon Nov 7 16:07:05 CET 2005
Hi Masi,
> First of all, is there a reason to remove the comments? If yes, we
> need an option to do so.
Nope, the comments are _not_ removed when using XHTML-Cleaning. The tags
inside the comments are just transformed to small letters - which
imposes problems for RDF - namely for the timtab extension.
> Secondly, can't this be done by changing the way the cleaning code
> works? I think that processTags is the key for the solution. Adding an
> additional regexp plus string replace doesn't speed up an already
> costly page generation.
Maybe... I didn't have a closer look into this, but I think it is more
difficult to filter out comment sectiopns.
> Anyway, if you cannot get rid of the replacemnt stuff you can do it
> like that (mind the curly brackets within the ###'s):
> preg_replace('/<!--(.*?)-->/','###{\\1}###',$content);"
> preg_replace('/###{(.*?)}###-->/','<!--\\1-->',$content);"
thanks!
> PS: I really wonder who uses this stuff. The generated Code should be
> alerady valid XHTML. If not, fix the generator, donÄt write a
> workaround.
I don't know who uses xhtml-cleaning... But the problem exists when
using XHTML-Cleaning, and it should be fixed I think.
What do you suggest how to continue?
Greets, Sebastian
--
Sebastian Kurfuerst
http://garbage-group.de/kontakt.html
More information about the TYPO3-team-core
mailing list