Joining my HTML output into a single line (Google does it)

Phillip B Oldham phill at
Wed Oct 22 14:41:30 MSD 2008

What about elements which are styled to have white-space intact using 
CSS? For instance:

<div style="white-space: pre">

This is a
div            with whitespace


Will mod_strip leave that alone? I'm guessing it won't. There's also 
<textareas /> to take into consideration, and linked stylesheets 
defining "pre" elements. Oh, and Javascript adding it on afterwards.

Not bashing here - I think mod_strip is a great idea and I've used it 
myself on occasion. I've also found that it causes some headaches with 
out designers as they expect copy to lay out correct when they throw a 
"pre" on there and it doesn't.

Davy Campano wrote:
> mod_strip leaves intact comments as well as <pre> tags.
> On Sat, Oct 18, 2008 at 11:20 AM, Brett Hoerner 
> <bretthoerner at <mailto:bretthoerner at>> wrote:
>     On Sat, Oct 18, 2008 at 8:57 AM, Redd Vinylene
>     <reddvinylene at <mailto:reddvinylene at>> wrote:
>     > Yeah but, I never meant for it to touch what's inside tags, only
>     > what's outside tags.
>     But you did say,
>     On Fri, Oct 17, 2008 at 8:57 AM, Redd Vinylene
>     <reddvinylene at <mailto:reddvinylene at>> wrote:
>     > I don't wanna worry about tons of blank lines and messed up
>     indentation.
>     Almost all of your blank lines and indentation are inside of <html>,
>     or <body>, or <div>, or ... tags.  So if you want to ignore the inside
>     of tags then you'd only be stripping whitespace off before and after
>     the <html> tags.
>     Brett


*Phillip B Oldham*
The Activity People
phill at <mailto:phill at>



This e-mail and its attachments are intended for the above named 
recipient(s) only and may be confidential. If they have come to you in 
error, please reply to this e-mail and highlight the error. No action 
should be taken regarding content, nor must you copy or show them to anyone.

This e-mail has been created in the knowledge that Internet e-mail is 
not a 100% secure communications medium, and we have taken steps to 
ensure that this e-mail and attachments are free from any virus. We must 
advise that in keeping with good computing practice the recipient should 
ensure they are completely virus free, and that you understand and 
observe the lack of security when e-mailing us.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: phill.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <>

More information about the nginx mailing list