postman-collection
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -13,3 +13,3 @@ var _ = require('../util').lodash, | ||
pedantic: false, | ||
sanitize: true, | ||
sanitize: false, | ||
smartLists: true, | ||
@@ -21,5 +21,8 @@ smartypants: false | ||
'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', | ||
'pre'], | ||
'pre', 'img', 'abbr', 'address', 'section', 'article', 'aside', 'dd', 'dl', 'dt', 'tfoot'], | ||
allowedAttributes: { | ||
a: ['href'] | ||
a: ['href'], | ||
img: ['src', 'width', 'height', 'alt'], | ||
td: ['align'], | ||
th: ['align'] | ||
} | ||
@@ -157,3 +160,3 @@ }, | ||
'text/markdown': function (content) { | ||
return marked(content); // it is sanitised html anyway! | ||
return sanitizeHtml(marked(content)); | ||
}, | ||
@@ -160,0 +163,0 @@ |
@@ -41,3 +41,4 @@ var _ = require('../util').lodash, | ||
urlencoded = options.urlencoded, | ||
formdata = options.formdata; | ||
formdata = options.formdata, | ||
file = options.file; | ||
@@ -58,2 +59,4 @@ // Handle URL Encoded data | ||
_.isString(options.file) && (file = { ref: file }); | ||
// If mode is raw but options does not give raw content, set it to empty string | ||
@@ -90,3 +93,12 @@ (mode === RequestBody.MODES.raw && !raw) && (raw = ''); | ||
*/ | ||
formdata: formdata | ||
formdata: formdata, | ||
/** | ||
* Holds a reference to a file which should be read as the RequestBody. It can be a file path (when used | ||
* with Node) or a unique ID (when used with the browser). | ||
* | ||
* @note The reference stored here should be resolved by a resolver function (which should be provided to | ||
* the Postman Runtime). | ||
*/ | ||
file: file | ||
}); | ||
@@ -97,3 +109,3 @@ }, | ||
// Formdata. Goodluck. | ||
if (this.mode === RequestBody.MODES.formdata) { | ||
if (this.mode === RequestBody.MODES.formdata || this.mode === RequestBody.MODES.file) { | ||
// @todo: implement this, check if we need to return undefined or something. | ||
@@ -128,3 +140,4 @@ return; | ||
formdata: 'formdata', | ||
urlencoded: 'urlencoded' | ||
urlencoded: 'urlencoded', | ||
file: 'file' | ||
} | ||
@@ -131,0 +144,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"author": "Postman Labs <help@getpostman.com>", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "postman" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
262675
5925