Ticket #7482 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

IDs in Resource Registries are not urlencoded

Reported by: pfurman Owned by: fschulze
Priority: minor Milestone: 3.1
Component: Infrastructure Keywords: resource registries
Cc:

Description

IDs in Resource Registries ZMI screen (eg. portal_css) are not urlencoded, which makes some problems.

For example Paste Script creates resources with IDs like '++resource++theme.name/main.css'. Such resources cannot be removed through portal_css, because '+' is not urlencoded, and will be replaced with space. Moving up and down works only thanks to javascript action, which prevents calling python function.

Proposal solution is to add one more function to this Resource class - source:/ResourceRegistries/trunk/Products/ResourceRegistries/tools/BaseRegistry.py@16907#L68 - and use it for links in templates instead of getId, eg.:

from urllib import urlencode
def getUrlencodedId(self):
    return urlencode({'':self._data['id']})[1:]

Change History

comment:1 Changed 4 years ago by wichert

  • Owner changed from somebody to fschulze
  • Component changed from Unknown to Infrastructure

comment:2 Changed 4 years ago by fschulze

  • Status changed from new to closed
  • Resolution set to fixed

(In [20035]) Properly encode the resource id. This fixes moving of resource without JS and removing recources which contain special chars like plus signs. Fixes #7482

Note: See TracTickets for help on using tickets.