diff --git a/lib/server/v2/commands/Propfind.js b/lib/server/v2/commands/Propfind.js index e7ec69ec..9418ee0b 100644 --- a/lib/server/v2/commands/Propfind.js +++ b/lib/server/v2/commands/Propfind.js @@ -109,16 +109,7 @@ var default_1 = (function () { for (var _i = 0, _a = reqBody.leftElements; _i < _a.length; _i++) { var el = _a[_i]; if (el) { - var name_1 = el.name; - var attributes = undefined; - var namespaceSeparatorIndex = name_1.indexOf(':'); - if (namespaceSeparatorIndex >= 0) { - attributes = { - 'xmlns:x': name_1.substring(0, namespaceSeparatorIndex) - }; - name_1 = 'x:' + name_1.substring(namespaceSeparatorIndex + 1); - } - prop_2.ele(name_1, attributes); + prop_2.add(el); } } } @@ -263,11 +254,11 @@ var default_1 = (function () { pm.getProperties(function (e, properties) { if (e) return nbOut(e); - for (var name_2 in properties) { - if (reqBody.mustDisplay(name_2)) { - var tag = prop.ele(name_2); - if (reqBody.mustDisplayValue(name_2)) { - var property = properties[name_2]; + for (var name_1 in properties) { + if (reqBody.mustDisplay(name_1)) { + var tag = prop.ele(name_1); + if (reqBody.mustDisplayValue(name_1)) { + var property = properties[name_1]; if (tag.attributes) for (var attName in property.attributes) tag.attributes[attName] = property.attributes[attName]; diff --git a/src/server/v2/commands/Propfind.ts b/src/server/v2/commands/Propfind.ts index 9f678c79..d17654e1 100644 --- a/src/server/v2/commands/Propfind.ts +++ b/src/server/v2/commands/Propfind.ts @@ -154,19 +154,7 @@ export default class implements HTTPMethod { if(el) { - let name = el.name; - let attributes = undefined; - - const namespaceSeparatorIndex = name.indexOf(':'); - if(namespaceSeparatorIndex >= 0) - { - attributes = { - 'xmlns:x': name.substring(0, namespaceSeparatorIndex) - }; - name = 'x:' + name.substring(namespaceSeparatorIndex + 1); - } - - prop.ele(name, attributes); + prop.add(el); } } }