Does anyone else see an issue with script formatting not working in winbox in 7.1.1.?
I just upgraded to 7.1.1 from 6.49.1 and the formatting is all gone in the scripts in winbox but it looks fine on a browser with webfig
I am running whatever the latest winbox is.
fyi, this has been raised with Mikrotik support (SUP-72676)
at the moment they indicate they are unable to reproduce it.
(the results are the same on my device for a script that was there already before the upgrade to 7.1.1 and for scripts added afterward)
Could you describe or show what the issue is?
this is what i see in winbox

this is from a web browser

It’s most likely Unix line endings. Do /system/script/export and check if you see \r\n (Windows) or just \n (Unix).
thanks
i only see \n\
strange that webfig would handle it fine but not winbox (especially as winbox used to handle it fine before 7.1.1)
hopefully an easy fix for the Mikrotik team
WinBox saves with Windows line endings.
WebFig saves with Unix line ending.
Script editor in CLI (/system/script/edit source) also saves with Unix line ending (please mention this too when you write them).
have let support know to look here
I would have thought/hoped the old CR/LF had gone away a decade or two ago! ![]()
Support has been unable to reproduce it:
I see the same results on two different windows devices on my network though
I just tested pasting the script into winbox and it formats fine in both. However, when I take the same script from the same clipboard (so identical content) and paste it into webfig it loses all formatting in winbox (which makes me think winbox may indeed have the issue with Linux formatting)
I guess one answer is to write/paste your scripts in winbox? I don’t know what happens with command line
I wonder how they managed to not reproduce it, it’s clearly there:
/system script
add dont-require-permissions=no name="script saved using winbox" owner=sob policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="line1\r\
\nline2\r\
\nline3"
add dont-require-permissions=no name="script saved using webfig" owner=sob policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="line1\
\nline2\
\nline3"
add dont-require-permissions=no name="script saved using cli editor" owner=sob policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="line1\
\nline2\
\nline3"
\r\n when saved in WinBox, \n otherwise.
Well it’s pretty easy to reproduce with webfig when creating a new script on 7.1.1.
I have tried creating a simple script with 5 lines and while on webfig when writing and editing it looks fine, in winbox and on export it has line ending with \r\n.
I cannot believe that MT support will say that they didn’t managed to re-produce it.
And did they write what exact part they can’t reproduce? Do they get consistent line endings no matter where they save script? Or does their WinBox show both types of line endings correctly?
We managed to reproduce this, thanks. Please, when sending reports to us make sure to include accurate description on how to reproduce issue.