<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm making something, and need to block out BGCOLOR attribute. The problem
> is, the BGCOLOR could be with or without quotation marks. This is the code
I
> used:
>
> $article =~ s/ bgcolor=("?)(.*?)("?)//gi
>
Here is how I would do it,
Just so everyone knows, it was for a print friendly part of a CMS-type
script. With all your help, it was solved, with a regex. It wasn't just for
the body tag, It is for EVERY tag, and I blocked the BGCOLOR, BACKGROUND,
STYLE, CLASS, ID, COLOR, and more attributes to totally make the page both
volks,
brief prefix. I believe Li Ngok Lam has found a clear
'issue' in the original request for solving a regex problem.
my working assumption was that the OP needed a filter that
would clean up a bunch of pre-existing static *.html files
because the site had adopted a new scheme, and so these ol
Hello World
Li Ngok Lam's approach looks good to me. Using the $line=~s// approach
appears to be only removing the bgcolor word correctly but could be
stuck on the different types of colour descriptor used. Is it RGB, hex
or a word?
Putting a background color descriptor in though allows you to ch
What about the user says :
or
or
Anyway, the bgcolor can be formed or change again via javascript or CSS.
I mean, blocking bgcolor in body tag cannot solve your potential problem.
But you may find someway to put this in your body tag :
background="white_block.jpg",
as wallpaper goes upper tha
On Thursday, Mar 20, 2003, at 11:26 US/Pacific, Kipp, James wrote:
I'm saying it could be bgcolor="COLOR" or bgcolor=COLOR
Yes I realize. I believe drieux's solution, or an adaptation of it,
is what you need
note: I do subs because it is easier for me to 'loop on them'
and if they are worth it, th
>I'm saying it could be bgcolor="COLOR" or bgcolor=COLOR
Yes I realize. I believe drieux's solution, or an adaptation of it, is what
you need
I would of course go with say:
#
#
sub un_colour {
I'm saying it could be bgcolor="COLOR" or bgcolor=COLOR
On Thursday, Mar 20, 2003, at 06:00 US/Pacific, Kipp, James wrote:
I'm making something, and need to block out BGCOLOR
attribute. The problem
is, the BGCOLOR could be with or without quotation marks.
This is the code I
used:
$article =~ s/ bgcolor=("?)(.*?)("?)//gi
so you are saying it could be b
>
> I'm making something, and need to block out BGCOLOR
> attribute. The problem
> is, the BGCOLOR could be with or without quotation marks.
> This is the code I
> used:
>
> $article =~ s/ bgcolor=("?)(.*?)("?)//gi
>
so you are saying it could be bgcolor or "bgcolor" ?
how about something
I'm making something, and need to block out BGCOLOR attribute. The problem
is, the BGCOLOR could be with or without quotation marks. This is the code I
used:
$article =~ s/ bgcolor=("?)(.*?)("?)//gi
It doesn't work to my liking, and was hoping someone else had a better
solution.
William
11 matches
Mail list logo