<div dir="ltr"><div dir="ltr">Hello. What about this ?<br><div><br></div><div>Best regards,</div><div>Alexandr</div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">15.07.2019 г.  16:27, Alexandr Koverninsky <<a href="mailto:a.koverninsky@gmail.com">a.koverninsky@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The closing '?>' needs to be printed using '?<?vlc print ">" ?>' to prevent a parse error.<br>
---<br>
 share/lua/http/js/jquery.jstree.js          | 4 ++--<br>
 share/lua/http/requests/browse.xml          | 2 +-<br>
 share/lua/http/requests/playlist.xml        | 2 +-<br>
 share/lua/http/requests/playlist_jstree.xml | 2 +-<br>
 share/lua/http/requests/status.xml          | 2 +-<br>
 share/lua/http/requests/vlm.xml             | 4 ++--<br>
 share/lua/http/requests/vlm_cmd.xml         | 4 ++--<br>
 share/lua/intf/http.lua                     | 7 ++-----<br>
 8 files changed, 12 insertions(+), 15 deletions(-)<br>
<br>
diff --git a/share/lua/http/js/jquery.jstree.js b/share/lua/http/js/jquery.jstree.js<br>
index 59e49296d7..a47e949c65 100644<br>
--- a/share/lua/http/js/jquery.jstree.js<br>
+++ b/share/lua/http/js/jquery.jstree.js<br>
@@ -3027,7 +3027,7 @@<br>
                return false;<br>
        };<br>
        var xsl = {<br>
-               'nest' : '<' + '?xml version="1.0" encoding="utf-8" ?<?vlc print '>'?>' +<br>
+               'nest' : '<' + '?xml version="1.0" encoding="utf-8" ?>' +<br>
                        '<xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform" rel="noreferrer" target="_blank">http://www.w3.org/1999/XSL/Transform</a>" >' + <br>
                        '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />' + <br>
                        '<xsl:template match="/">' + <br>
@@ -3088,7 +3088,7 @@<br>
                        '</xsl:template>' + <br>
                        '</xsl:stylesheet>',<br>
<br>
-               'flat' : '<' + '?xml version="1.0" encoding="utf-8" ?<?vlc print '>'?>' +<br>
+               'flat' : '<' + '?xml version="1.0" encoding="utf-8" ?>' +<br>
                        '<xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform" rel="noreferrer" target="_blank">http://www.w3.org/1999/XSL/Transform</a>" >' + <br>
                        '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />' + <br>
                        '<xsl:template match="/">' + <br>
diff --git a/share/lua/http/requests/browse.xml b/share/lua/http/requests/browse.xml<br>
index 0afff8f090..59ac5c3c34 100644<br>
--- a/share/lua/http/requests/browse.xml<br>
+++ b/share/lua/http/requests/browse.xml<br>
@@ -1,4 +1,4 @@<br>
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print'>'?><br>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?><br>
 <?vlc --[[<br>
 vim:syntax=lua<br>
 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
diff --git a/share/lua/http/requests/playlist.xml b/share/lua/http/requests/playlist.xml<br>
index 8b8930b657..7cbcd75baa 100644<br>
--- a/share/lua/http/requests/playlist.xml<br>
+++ b/share/lua/http/requests/playlist.xml<br>
@@ -1,4 +1,4 @@<br>
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print'>'?><br>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?><br>
 <?vlc --[[<br>
 vim:syntax=lua<br>
 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
diff --git a/share/lua/http/requests/playlist_jstree.xml b/share/lua/http/requests/playlist_jstree.xml<br>
index 0cdc309f2b..fcf19a328a 100644<br>
--- a/share/lua/http/requests/playlist_jstree.xml<br>
+++ b/share/lua/http/requests/playlist_jstree.xml<br>
@@ -1,4 +1,4 @@<br>
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print'>'?><br>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?><br>
 <?vlc --[[<br>
 vim:syntax=lua<br>
 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
diff --git a/share/lua/http/requests/status.xml b/share/lua/http/requests/status.xml<br>
index 2d76b6a556..fec2d9d383 100644<br>
--- a/share/lua/http/requests/status.xml<br>
+++ b/share/lua/http/requests/status.xml<br>
@@ -1,4 +1,4 @@<br>
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlcprint'>'?><br>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?><br>
 <?vlc --[[<br>
 vim:syntax=lua<br>
 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
diff --git a/share/lua/http/requests/vlm.xml b/share/lua/http/requests/vlm.xml<br>
index ddb9f2b562..df34e7f6d3 100644<br>
--- a/share/lua/http/requests/vlm.xml<br>
+++ b/share/lua/http/requests/vlm.xml<br>
@@ -1,5 +1,5 @@<br>
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print '>'<br>
---[[<br>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?><br>
+<?vlc --[[<br>
 vim:syntax=lua<br>
 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
 <  vlm.xml: VLC media player web interface<br>
diff --git a/share/lua/http/requests/vlm_cmd.xml b/share/lua/http/requests/vlm_cmd.xml<br>
index 10a9a4a42b..fb6af4790a 100644<br>
--- a/share/lua/http/requests/vlm_cmd.xml<br>
+++ b/share/lua/http/requests/vlm_cmd.xml<br>
@@ -1,5 +1,5 @@<br>
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print '>'<br>
---[[<br>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?><br>
+<?vlc --[[<br>
 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
 <  vlm_cmd.xml: VLC media player web interface<br>
 < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ><br>
diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua<br>
index fc6d1a3156..04f60b091a 100644<br>
--- a/share/lua/intf/http.lua<br>
+++ b/share/lua/intf/http.lua<br>
@@ -73,11 +73,8 @@ function process_raw(filename)<br>
     end<br>
     str=string.rep("=",#str-1)<br>
<br>
-    --[[ FIXME:<br>
-    <?xml version="1.0" encoding="charset" standalone="yes" ?> is still a problem. The closing '?>' needs to be printed using '?<?vlc print ">" ?>' to prevent a parse error.<br>
-    --]]<br>
-    local code0 = string.gsub(input,escape(close_tag)," print(["..str.."[")<br>
-    local code1 = string.gsub(code0,escape(open_tag),"]"..str.."]) ")<br>
+    local code0 = string.gsub(input,escape(open_tag),"]"..str.."]) ")<br>
+    local code1 = string.gsub(code0,"(%]"..str.."%]%) "..".-)("..escape(close_tag)..")","%1 print(["..str.."[")<br>
     local code = "print(["..str.."["..code1.."]"..str.."])"<br>
     --[[ Uncomment to debug<br>
     if string.match(filename,"vlm_cmd.xml$") then<br>
-- <br>
2.19.1.windows.1<br>
<br>
</blockquote></div></div>