Wed, 16 Jan 2013 19:56:34 +0100
Fixed usage of Utilities.html_encode() in various places.
(grafted from cb5489f9b7344941d6043da7107a13a5683d2b60)
--- a/Helpviewer/SslCertificatesDialog.py Mon Jan 14 18:48:35 2013 +0100 +++ b/Helpviewer/SslCertificatesDialog.py Wed Jan 16 19:56:34 2013 +0100 @@ -69,20 +69,20 @@ """ # step 1: extract the info to be shown if qVersion() >= "5.0.0": - organisation = Utilities.html_encode(Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.Organization)))) - commonName = Utilities.html_encode(Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))) + organisation = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.Organization))) + commonName = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) else: - organisation = Utilities.html_encode(Utilities.decodeString( - cert.subjectInfo(QSslCertificate.Organization))) - commonName = Utilities.html_encode(Utilities.decodeString( - cert.subjectInfo(QSslCertificate.CommonName))) + organisation = Utilities.decodeString( + cert.subjectInfo(QSslCertificate.Organization)) + commonName = Utilities.decodeString( + cert.subjectInfo(QSslCertificate.CommonName)) if organisation is None or organisation == "": organisation = self.trUtf8("(Unknown)") if commonName is None or commonName == "": commonName = self.trUtf8("(Unknown common name)") - expiryDate = Utilities.html_encode(cert.expiryDate().toString("yyyy-MM-dd")) + expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry items = self.serversCertificatesTree.findItems(organisation, @@ -261,20 +261,20 @@ """ # step 1: extract the info to be shown if qVersion() >= "5.0.0": - organisation = Utilities.html_encode(Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.Organization)))) - commonName = Utilities.html_encode(Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))) + organisation = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.Organization))) + commonName = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) else: - organisation = Utilities.html_encode(Utilities.decodeString( - cert.subjectInfo(QSslCertificate.Organization))) - commonName = Utilities.html_encode(Utilities.decodeString( - cert.subjectInfo(QSslCertificate.CommonName))) + organisation = Utilities.decodeString( + cert.subjectInfo(QSslCertificate.Organization)) + commonName = Utilities.decodeString( + cert.subjectInfo(QSslCertificate.CommonName)) if organisation is None or organisation == "": organisation = self.trUtf8("(Unknown)") if commonName is None or commonName == "": commonName = self.trUtf8("(Unknown common name)") - expiryDate = Utilities.html_encode(cert.expiryDate().toString("yyyy-MM-dd")) + expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry items = self.caCertificatesTree.findItems(organisation,
--- a/Helpviewer/SslInfoWidget.py Mon Jan 14 18:48:35 2013 +0100 +++ b/Helpviewer/SslInfoWidget.py Wed Jan 16 19:56:34 2013 +0100 @@ -70,10 +70,10 @@ self.issuerOrganizationalUnitLabel.setText(self.__certificateString( certificate.issuerInfo(QSslCertificate.OrganizationalUnitName))) self.serialNumberLabel.setText(self.__serialNumber(certificate)) - self.effectiveLabel.setText(Utilities.html_encode( - certificate.effectiveDate().toString("yyyy-MM-dd"))) - self.expiresLabel.setText(Utilities.html_encode( - certificate.expiryDate().toString("yyyy-MM-dd"))) + self.effectiveLabel.setText( + certificate.effectiveDate().toString("yyyy-MM-dd")) + self.expiresLabel.setText( + certificate.expiryDate().toString("yyyy-MM-dd")) self.sha1Label.setText(self.__formatHexString( str(certificate.digest(QCryptographicHash.Sha1).toHex(), encoding="ascii"))) self.md5Label.setText(self.__formatHexString( @@ -97,7 +97,7 @@ if txt is None or txt == "": return self.trUtf8("<not part of the certificate>") - return Utilities.html_encode(Utilities.decodeString(txt)) + return Utilities.decodeString(txt) def __serialNumber(self, cert): """ @@ -133,7 +133,7 @@ hexList.append(hexString[:2]) hexString = hexString[2:] - return Utilities.html_encode(':'.join(hexList)) + return ':'.join(hexList) def __hasExpired(self, effectiveDate, expiryDate): """
--- a/Helpviewer/UrlBar/UrlBar.py Mon Jan 14 18:48:35 2013 +0100 +++ b/Helpviewer/UrlBar/UrlBar.py Wed Jan 16 19:56:34 2013 +0100 @@ -180,19 +180,18 @@ sslInfo = self.__browser.page().getSslInfo() if sslInfo is not None: if qVersion() >= "5.0.0": - org = Utilities.html_encode(Utilities.decodeString( - ", ".join(sslInfo.subjectInfo(QSslCertificate.Organization)))) + org = Utilities.decodeString( + ", ".join(sslInfo.subjectInfo(QSslCertificate.Organization))) else: - org = Utilities.html_encode(Utilities.decodeString( - sslInfo.subjectInfo(QSslCertificate.Organization))) + org = Utilities.decodeString( + sslInfo.subjectInfo(QSslCertificate.Organization)) if org == "": if qVersion() >= "5.0.0": - cn = Utilities.html_encode(Utilities.decodeString( - ", ".join( - sslInfo.subjectInfo(QSslCertificate.CommonName)))) + cn = Utilities.decodeString(", ".join( + sslInfo.subjectInfo(QSslCertificate.CommonName))) else: - cn = Utilities.html_encode(Utilities.decodeString( - sslInfo.subjectInfo(QSslCertificate.CommonName))) + cn = Utilities.decodeString( + sslInfo.subjectInfo(QSslCertificate.CommonName)) if cn != "": org = cn.split(".", 1)[1] if org == "":