mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-05-24 05:24:34 +08:00
Pass the toKeyValue() test - parsing flags
This commit is contained in:
@@ -398,8 +398,8 @@ function parseKeyValue(/**string*/keyValue) {
|
||||
|
||||
function toKeyValue(obj) {
|
||||
var parts = [];
|
||||
foreach(obj, function(value, key){
|
||||
parts.push(escape(key) + '=' + escape(value));
|
||||
foreach(obj, function(value, key) {
|
||||
parts.push(escape(key) + (value === true ? '' : '=' + escape(value)));
|
||||
});
|
||||
return parts.length ? parts.join('&') : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user