From cae13631fa981748b77d9c9494e7dea9538101af Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Fri, 17 Feb 2012 14:55:38 -0800 Subject: [PATCH] MSU.app: Encode update descriptions in UTF-8 before passing to WebKit WebFrame loadData_MIMEType_textEncodingName_baseURL_. Fixes an issue with certain Mac OS X versions. --- code/Managed Software Update/Info.plist | 2 +- .../MSUOptionalInstallsViewController.py | 2 +- code/Managed Software Update/MSUupdatesViewController.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Managed Software Update/Info.plist b/code/Managed Software Update/Info.plist index 5ceed1af..a23deb50 100644 --- a/code/Managed Software Update/Info.plist +++ b/code/Managed Software Update/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 3.3.1 + 3.3.2 LSHasLocalizedDisplayName NSMainNibFile diff --git a/code/Managed Software Update/MSUOptionalInstallsViewController.py b/code/Managed Software Update/MSUOptionalInstallsViewController.py index 08179b39..a08e18bc 100644 --- a/code/Managed Software Update/MSUOptionalInstallsViewController.py +++ b/code/Managed Software Update/MSUOptionalInstallsViewController.py @@ -129,7 +129,7 @@ class MSUOptionalInstallsViewController(NSViewController): self.descriptionView.mainFrame().loadHTMLString_baseURL_(description, None) else: self.descriptionView.mainFrame().loadData_MIMEType_textEncodingName_baseURL_( - buffer(description), + buffer(description.encode('UTF-8')), u"text/plain", u"utf-8", None) def updateDescriptionView(self): #NSLog(u"MSUOptionalInstallsViewController.updateDescriptionView") diff --git a/code/Managed Software Update/MSUupdatesViewController.py b/code/Managed Software Update/MSUupdatesViewController.py index d422d8d1..02e2fd9c 100644 --- a/code/Managed Software Update/MSUupdatesViewController.py +++ b/code/Managed Software Update/MSUupdatesViewController.py @@ -78,7 +78,7 @@ class MSUupdatesViewController(NSViewController): self.descriptionView.mainFrame().loadHTMLString_baseURL_(description, None) else: self.descriptionView.mainFrame().loadData_MIMEType_textEncodingName_baseURL_( - buffer(description), + buffer(description.encode('UTF-8')), u"text/plain", u"utf-8", None) def updateDescriptionView(self):