Skip to content

Commit

Permalink
fix: Malformed xml in device description
Browse files Browse the repository at this point in the history
Fixed #465
  • Loading branch information
pascalopitz committed Jun 29, 2020
1 parent 6dbc924 commit cbec942
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ Helpers.ParseXml = async function (input) {
* @return {Promise}
*/
Helpers.SanitizeDeviceDescriptionXml = async function (input) {
// This is to fix malformed xml in description see https://github.com/bencevans/node-sonos/issues/465
debug('Helpers.SanitizeDeviceDescriptionXml %j', input)
return input.replace(/#([_\w]+)#/gm, '<!-- #$1# -->')
return input.replace(/#([\w]+)#/gm, '<!-- #$1# -->')
}

module.exports = Helpers

0 comments on commit cbec942

Please sign in to comment.