|
Posted by Jerry Stuckle on 04/04/06 06:19
Stephen Kay wrote:
> in article D4adnWT79PzUBqzZnZ2dnUVZ_sydnZ2d@comcast.com, Jerry Stuckle at
> jstucklex@attglobal.net wrote on 4/3/06 7:01 PM:
>
>
>>You need to be careful - you can't just replace to the next ">", i.e. (on
>>three
>>lines for the heck of it)
>>
>><body TEXT="#99FFFF"
>><!-- BG color was black -->
>>BGCOLOR="#0000FF">
>
>
> OK, I see your point, but did you have a solution to offer? How would you
> search for this kind of situation, in order to strip out a body tag?
>
> Luckily, I don't think any of the pages I need to treat this way have that
> kind of stuff in them...
>
First of all, I wouldn't do it like you are. I'd have each page and include
header and footer files as necessary.
But if I *had* to do this (kicking and screaming) I'd go ahead and delete the
tags from the files.
Remember - it isn't just <head>, <body>, etc. - you may have metatags and all
kinds of other things.
Otherwise you need to parse each page one character at a time, looking for
nesting, quotes and all kinds of other things. And it would have to be done
every time the page is loaded.
Shortcuts seldom are shortcuts in the long run!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|