Re: Wiki page for style attribute

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 UTC