X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9d566b4741eb66bf09b5c7d213aa8541886e100a..fd9164545d4a1cf2d508b4125a45643a0b8375fa:/src/redakcja/static/js/wiki/xslt.js diff --git a/src/redakcja/static/js/wiki/xslt.js b/src/redakcja/static/js/wiki/xslt.js index 99af3c35..00854a79 100644 --- a/src/redakcja/static/js/wiki/xslt.js +++ b/src/redakcja/static/js/wiki/xslt.js @@ -36,7 +36,7 @@ function withStylesheets(code_block, onError) function xml2html(options) { withStylesheets(function() { - var xml = options.xml.replace(/\/(\s+)/g, '
$1'); + var xml = options.xml.replace(/\/(\s+)/g, '<_n />$1'); xml = xml.replace(/([^a-zA-Z0-9ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s<>«»\\*_!,:;?&%."'=#()\/-]+)/g, '$1'); 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'), ); })