This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author moonflow
Recipients moonflow
Date 2012-11-20.14:09:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za>
In-reply-to
Content
if a <tr> include two <a> or more,SGMLParser processing has a problem

for example:
    <tr>
    <td align="center" valign="top" nowrap>
    <script language="Javascript">
    <!--
      if ( 4 == 4 ) document.write("<strong class=\"Critical small\">Critical</strong>");
      if ( 4 == 3 ) document.write("<strong class=\"High small\">High</strong>");
      if ( 4 == 2 ) document.write("<strong class=\"Medium small\">Medium</strong>");
      if ( 4 == 1 ) document.write("<strong class=\"Low small\">Low</strong>");
    //--> 
    </script>
    </td>
    <td valign="top" align="center" nowrap>
    <small><script type="text/javascript">document.write(FormatDate("%d-%b-%y", "2012", "11", "18"));</script></small>
    </td>
    <td valign="top" align="center" nowrap><small>
    <a title="CPAI-2012-809" style="text-transform:uppercase" href="2012/cpai-08-nov.html">
    CPAI-2012-809</a></small>
    </td>
    <td valign="top" nowrap align="center"><small>
    <a target="_blank" href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2089">CVE-2011-2089</a><br /></small>
    </td>
    <td valign="top"><small>SCADA ICONICS WebHMI ActiveX Stack Overflow (2011-2089)</small></td>
    </tr>

def start_a(self, attrs):
        if self.is_td:       
            cve_href = [v for k, v in attrs if k == "target" and v == "_blank"]
            if cve_href:
                self.is_a = True
                self.is_cve = True

            #for SGMLParser maybe have a bug,a <tr> have two <a> has problem
            vul_href = [v for k, v in attrs if k == "style"]
            print vul_href
            if vul_href:
                vul_href = "".join([v for k, v in attrs if k == "href"])
                if vul_href.find("cve") == -1:
                    self.href_name = vul_href     
            else:
                self.href_name = ""

here print vul_href but print nothing.Is it ok?
History
Date User Action Args
2012-11-20 14:09:36moonflowsetrecipients: + moonflow
2012-11-20 14:09:36moonflowsetmessageid: <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za>
2012-11-20 14:09:36moonflowlinkissue16513 messages
2012-11-20 14:09:36moonflowcreate