Kaydet (Commit) d34a9c98 authored tarafından Fred Drake's avatar Fred Drake

Added more link attributes based on additonal information from Chris

McCafferty <christopher.mccafferty@csg.ch>, and a bit of experimentation
with Navigator 4.7.

HTML-as-deployed is evil!
üst 37f02638
...@@ -794,7 +794,7 @@ class MyHTMLParser(sgmllib.SGMLParser): ...@@ -794,7 +794,7 @@ class MyHTMLParser(sgmllib.SGMLParser):
self.link_attr(attributes, 'href') self.link_attr(attributes, 'href')
def do_body(self, attributes): def do_body(self, attributes):
self.link_attr(attributes, 'background') self.link_attr(attributes, 'background', 'bgsound')
def do_img(self, attributes): def do_img(self, attributes):
self.link_attr(attributes, 'src', 'lowsrc') self.link_attr(attributes, 'src', 'lowsrc')
...@@ -820,6 +820,18 @@ class MyHTMLParser(sgmllib.SGMLParser): ...@@ -820,6 +820,18 @@ class MyHTMLParser(sgmllib.SGMLParser):
def do_script(self, attributes): def do_script(self, attributes):
self.link_attr(attributes, 'src') self.link_attr(attributes, 'src')
def do_table(self, attributes):
self.link_attr(attributes, 'background')
def do_td(self, attributes):
self.link_attr(attributes, 'background')
def do_th(self, attributes):
self.link_attr(attributes, 'background')
def do_tr(self, attributes):
self.link_attr(attributes, 'background')
def link_attr(self, attributes, *args): def link_attr(self, attributes, *args):
for name, value in attributes: for name, value in attributes:
if name in args: if name in args:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment