1 define(['libs/jquery-1.9.1.min'], function($) {
\r
3 cleanUp: function(xml) {
\r
5 var rmws = function(node) {
\r
6 if(node.nodeType === 3) {
\r
7 node.data = $.trim(node.data);
\r
10 $(node).contents().each(function() {
\r
16 xml = $($.trim(xml));
\r
17 xml.each(function() {
\r
22 .replace(/(<.*>)\s*(<.*>)/gm, '$1$2')
\r
23 .replace(/(<\/.*>)\s*(<\/.*>)/gm, '$1$2')
\r
24 .replace(/(<\/.*>)\s*(<.*>)/gm, '$1$2');
\r
25 return $.trim(toret);*/
\r
26 return $('<div>').append(xml).html();
\r