[drupal-devel] no ?> needed at the end of modules

Steven Wittens steven at acko.net
Mon Aug 22 11:43:39 UTC 2005

>Note that although HTML and XML is permissive on the whitespace you
>output, if you do generate some other format (ie. csv file, image, swf
>file) with output buffering, and store the results elsewhere, additional
>whitespace in unintentional places can be a big pain. It is actually
>irrelevant if you use output buffering or not.
Neither HTML nor XML are permissive on leading whitespace. AFAIK HTML is 
invalid if there is leading whitespace before the <!DOCTYPE> while XML 
is invalid if the <?xml ?> prolog is not the very first thing in the 
file (mostly for encoding reasons).

Yet another reason to get rid of ?>.


More information about the drupal-devel mailing list