Re: [SMARTY] {strip} smashes DOCTYPE

Monte Ohrt <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
{strip} takes whitespace off the beginning/ends of lines. This is 
typically only useful where HTML tags are at the beginning/ends of the 
lines. It isn't meant to be an HTML beautifier.

Maybe you should have a look at the trimwhitespace output filter that 
ships with Smarty, it might work better.

[email protected] wrote:

> Maximillian Schwanekamp wrote:
>
>> [email protected] wrote:
>>
>>  > {strip} smashes it so it looks like that -
>>  > <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 
>> Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>>  > Is this a bug or I am doing something wrong?
>>
>> Since the doctype is metadata, you probably should not be using strip 
>> on it at all.  Better to use it within the <body></body> only, since 
>> that is where the output is (and typically 99% of the extraneous 
>> whitespace).
>
>
> I see the point and I agree, but I think that's still a bug. 
> Especially for people who do not have experience with {strip} it might 
> be annoying. Wouldn't you agree {strip} should be fixed so that people 
> do not have to think where to put it so that it does not crash something.
>
> I am ready to contribute if this is considered useful.
>
> Iv
>

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.