W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: Wiki page for style attribute

From: Rene Saarsoo <nene@triin.net>
Date: Tue, 03 Jul 2007 20:03:02 +0300
To: "scott lewis" <sfl@scotfl.ca>, "Eric Daspet" <eric.daspet@survol.fr>
Cc: "HTML Working Group" <public-html@w3.org>
Message-ID: <op.tuwezcibexn25i@localhost>

Scott Lewis wrote:
> The only way to ensure that the external fragment matches your  
> document's styling would be to strip any inline style from the fragment.  
> To that end, removing a style element would seem to be simpler than  
> removing a number of style attributes.

Actually not.

If you look closely, the following regexes have exactly
the same width :)

s#style=("[^"]*"|'[^']*')##gm;

s#<style[^>]*>.*?</style>##gm;


Sure, those aren't really 100% correct. But I think you
get the general idea :)

--
Rene Saarsoo
Received on Tuesday, 3 July 2007 17:03:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT