Maint
[redakcja.git] / src / redakcja / static / js / wiki / xslt.js
index 99af3c3..00854a7 100644 (file)
@@ -36,7 +36,7 @@ function withStylesheets(code_block, onError)
 
 function xml2html(options) {
     withStylesheets(function() {
-        var xml = options.xml.replace(/\/(\s+)/g, '<br />$1');
+        var xml = options.xml.replace(/\/(\s+)/g, '<_n />$1');
         xml = xml.replace(/([^a-zA-Z0-9ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s<>«»\\*_!,:;?&%."'=#()\/-]+)/g, '<alien>$1</alien>');
         var parser = new DOMParser();
         var serializer = new XMLSerializer();
@@ -60,17 +60,10 @@ function xml2html(options) {
             source.text('');
             options.error(error.text(), source_text);
         } else {
-            let galleryUrl = new URL(
-                options.base,
-                window.location.href
-            );
             $("img", $(doc.childNodes)).each(function() {
                 $(this).attr(
                     'src',
-                    new URL(
-                        $(this).attr('src'),
-                        galleryUrl
-                    )
+                    $(this).attr('src'),
                 );
             })