Fix more quoting issues!

This commit is contained in:
Greg Neagle
2014-03-26 19:16:45 -07:00
parent 52cfcdddd4
commit f6a4ae8d9d
2 changed files with 5 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ import msulib
import munki
from operator import itemgetter
from urllib import quote_plus, unquote_plus
from urllib import quote, unquote
from Foundation import NSLocalizedString
from Foundation import NSDate
@@ -597,7 +597,7 @@ class OptionalItem(GenericItem):
self['size'] = munki.humanReadable(self['installed_size'])
else:
self['size'] = u''
self['detail_link'] = u'detail-%s.html' % quote_plus(self['name'])
self['detail_link'] = u'detail-%s.html' % quote(self['name'])
self['hide_cancel_button'] = u''
def _get_status(self):
@@ -701,7 +701,7 @@ class UpdateItem(GenericItem):
super(UpdateItem, self).__init__(*arg, **kw)
identifier = self.get('name', '') + '--version-' + self.get('version_to_install', '')
self['detail_link'] = ('updatedetail-%s.html'
% quote_plus(identifier))
% quote(identifier))
if not self['status'] == 'will-be-removed':
force_install_after_date = self.get('force_install_after_date')
if force_install_after_date:

View File

@@ -55,7 +55,7 @@ def write_page(page_name, html):
def build_detail_page(item_name):
'''Build page showing detail for a single optional item'''
items = MunkiItems.getOptionalInstallItems()
page_name = u'detail-%s.html' % quote(item_name)
page_name = u'detail-%s.html' % item_name
for item in items:
if item['name'] == item_name:
page = MunkiItems.OptionalItem(item)
@@ -479,7 +479,7 @@ def get_warning_text():
def build_updatedetail_page(identifier):
'''Build detail page for a non-optional update'''
items = MunkiItems.getUpdateList()
page_name = u'updatedetail-%s.html' % quote(identifier)
page_name = u'updatedetail-%s.html' % identifier
name, sep, version = identifier.partition('--version-')
for item in items:
if item['name'] == name and item['version_to_install'] == version: