Re[2]: Re: Strip - support for multiple templates...

From: Date: Tue, 11 Sep 2001 08:35:47 +0000
Subject: Re[2]: Re: Strip - support for multiple templates...
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1458@lists.php.net to get a copy of this message
Hi, Anders, Thx for answering .... I think there is a misunderstanding ... i think my english is not as good as it is needed to explain all I want how I want ... so I ll try to do my best ;). I think stripping HTML data can reduce it of 50 %.... so it is an interesting issue.... I have not tested strip in all case ... but if your code is clean and respect HTML 4.01 there is no way it will be destroy by stripping ... if you make a highlight of a PHP Source you'll have a stripped HTML code with some "<PRE>" .... for your example with : AJ> <TABLE AJ> cellpadding=0 AJ> cellspacing=0 AJ> bgcolor=#000000> do u think it's HTML ??? ;;))))) i mean who here wrote HTML like this ???? even Frontpage do better code ! we have to respect standards ... so let s do it ;) .... in fact after thinkiing of it i think it could be interesting to add a global var to the compiler ( like for caching files ) to strip automatically all templates or not .... and add a {nostrip} tag to handle impossible strippping of piece of code when you have this variable turn to ON. What do u think of it ? >AJ> Webmaster Flash France wrote: >> >> but if you think it could be possible to implement i think it's a good >> feature.... >> because when you have something like 100 templates... or a config var >> in the compiler to strip all the templates without using {strip} >> {/strip} ... AJ> Interesting thought, but it probably wouldn't work anyway, because: AJ> 1) Some parts of the templates shouldn't be stripped, such as preformatted text AJ> (<pre>bla bla...</pre>). Should we have a "{nostrip}" tag then? Yuck :) AJ> 2) The current implementation of strip "doesn't work". AJ> "Oh yes it works!!!" you say? Well, sometimes, but not in my "real-life" AJ> coding AJ> style. AJ> This TABLE tag can not be stripped without problems: AJ> <TABLE AJ> cellpadding=0 AJ> cellspacing=0 AJ> bgcolor=#000000> AJ> And this fails too: AJ> <P> AJ> text AJ> is very AJ> long AJ> </P> AJ> Text would have to be within HTML tags, and on a single line to be stripped AJ> correctly. AJ> The stripping code should return HTML that renders the same as the unstripped code, AJ> no matter how you write your template. AJ> Almost impossible, yes, but it could be better than it is today. AJ> I have modified the code to some extent, and at least it handles "errors" like the AJ> ones above, plus a few other quirks. AJ> If anybody thinks it could be useful I could send it to Monte/Andrei for AJ> evaluation, and perhaps they include it in a future version. AJ> /Anders ______________________________________ Cordialement, Martin DUBUC mailto:dubucm@wawawoom.com

« previous php.smarty.general (#1458) next »