mirror of
https://github.com/openSUSE/osc.git
synced 2025-10-07 01:30:03 +02:00
- escape attributes
This commit is contained in:
@@ -565,11 +565,12 @@ class Osc(cmdln.Cmdln):
|
|||||||
if cmd == 'attribute':
|
if cmd == 'attribute':
|
||||||
if not opts.attribute:
|
if not opts.attribute:
|
||||||
sys.exit('no attribute given to create')
|
sys.exit('no attribute given to create')
|
||||||
values=""
|
values= ''
|
||||||
if opts.set:
|
if opts.set:
|
||||||
|
opts.set = opts.set.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||||
for i in opts.set.split(','):
|
for i in opts.set.split(','):
|
||||||
values+="<value>%s</value>" % i
|
values += '<value>%s</value>' % i
|
||||||
d="""<attributes><attribute name='%s' >%s</attribute></attributes>""" % (opts.attribute, values)
|
d = '<attributes><attribute name=\'%s\' >%s</attribute></attributes>' % (opts.attribute, values)
|
||||||
url = makeurl(conf.config['apiurl'], attributepath)
|
url = makeurl(conf.config['apiurl'], attributepath)
|
||||||
f = http_POST(url, data=d)
|
f = http_POST(url, data=d)
|
||||||
while 1:
|
while 1:
|
||||||
|
Reference in New Issue
Block a user