Commit 4701f12c by Dan Koch Committed by GitHub

Quote nested API parameters in api.js

I sometimes have parameter names with a period (.) in them, to represent nested objects, e.g. containerobj.inner_param. The Javascript was throwing an error in the browsable API when interacting with those parameters.
parent b96a2201
......@@ -102,7 +102,7 @@ $(function () {
var entry = entries[i]
var paramKey = entry[0]
var paramValue = entry[1]
var $elem = $form.find('[name=' + paramKey + ']')
var $elem = $form.find('[name="' + paramKey + '"]')
var dataType = $elem.data('type') || 'string'
if (dataType === 'integer' && paramValue) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment