Thanks Brian,
I'll look at doing that, thatnk you.
Regards
Mark Dyer
_____
From: Brian Cummiskey [mailto:[EMAIL PROTECTED]
Sent: Friday, 9 December 2005 5:24 a.m.
To: [email protected]
Subject: Re: [php-list] Remove HTML Comments
Mark Dyer wrote:
> The function is to remove all html comments from in a page but ignore any
> style or script blocks.
Mark-
Using the
<script>
//<--
foo
//-->
</script>
method of commenting is outdated and really no longer applies. If your
user is still on IE3, let them see the code, in hopes that they will
upgrade their browser.
<script>
<![CDATA[
foo
]]>
</script>
is the way it should be done at this point, especially if you are using
an xhtml doctype.
same goes for CSS blocks:
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
CSS goes in here
/*]]>*/-->
</style>
if serve the XHTML as application/xhtml+xml
if you serve the xhtml as text/html,
<style type="text/css">
<![CDATA[
CSS goes in here
]]>
</script>
will suffice.
This is somethign to consider before you go through the hassel of the regex.
Of which, i can offer no guidance on, as I can never get those things to
work either :p
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
_____
YAHOO! GROUPS LINKS
* Visit your group "php-list <http://groups.yahoo.com/group/php-list>
" on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
_____
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/