Author Topic: Fix bad framesets  (Read 2928 times)

Jor

  • Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Fix bad framesets
« on: January 15, 2002, 06:55:30 PM »
This filter will fix framesets, when a "webmaster" mistakenly uses the <body> tag instead of <noframes>, killing the frameset in Opera, and possibly other W3C-compliant browsers.

Name = "Fix bad framesets 1"
Active = TRUE
Limit = 256
Match = "</frameset>*<body*>"
Replace = "<noframes>"

Name = "Fix bad framesets 2"
Active = TRUE
Limit = 256
Match = "</frameset>/1</body>"
Replace = "/1</noframes></frameset></body>"


The first filter replaces the body tag with the correct noframes, and the second filter correctly closes the frameset and page.


Please note that to use this filter properly, you have to have both filters activated, and placed in the correct order -- 1 has to come before 2.

Edited by - Jor on 07 Apr 2002  14:29:39
 

Jor

  • Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Fix bad framesets
« Reply #1 on: April 26, 2002, 01:54:14 PM »
The above filters do not work right.

Corrected versions:
Name = "Fix bad framesets 1"
Active = TRUE
Multi = TRUE
Limit = 256
Match = "</frameset>*<body 1"
Replace = "<noframes>
<body 1"

Name = "Fix bad framesets 2"
Active = TRUE
Multi = TRUE
Limit = 256
Match = "</frameset> /1 </body>"
Replace = "/1
"
          "</body></noframes>
"
          "</frameset>
"
Please replace if you are using these.

 
 

Jor

  • Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Fix bad framesets
« Reply #2 on: June 03, 2002, 12:15:31 PM »
Updated version:

[Patterns]
Name = "Fix bad framesets 1"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm) & $LST(BadFrames)"
Limit = 256
Match = "</frameset>*<body 1"
Replace = "<noframes>
<body 1$STOP()"

Name = "Fix bad framesets 2"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm) & $LST(BadFrames)"
Limit = 256
Match = "</frameset> /1 </body>"
Replace = "/1
</body></noframes>
"
          "</frameset>
$STOP()"


Since I rarely encounter pages anymore where these filters are needed, I now place the offending URLs into a blocklist (BadFrames) instead, so the filters are bypassed elsewhere.



Edited by - Jor on 18 Jun 2002  15:36:19