Page 1 of 1
Export white list: no separators
Posted: Mon Jun 22, 2015 4:34 pm
by Kdmeizk
NoScript version: 2.6.9.27
Description: After export the white list, we see no separators in the file between URLs. I don't want to test the import feature because I think the result will be "amazing".
Re: Export white list: no separators
Posted: Mon Jun 22, 2015 6:08 pm
by barbaz
Please explain more, what's a separator and what do you mean by amazing?
(If you didn't explain more due to a language barrier, I can try to do this in French...)
Re: Export white list: no separators
Posted: Mon Jun 22, 2015 8:54 pm
by Kdmeizk
You can look its content :
How NoScript can import this without a disaster ????????
Re: Export white list: no separators
Posted: Mon Jun 22, 2015 9:12 pm
by barbaz
Ah. Notepad can't handle Unix style end-of-line marker ("\n") - it only knows Windows/DOS end-of-line marker ("\r\n") and it doesn't know what to do with plain \n
For me on Unix whitelist entries are separated by new line. (I've just done an export to verify that this is still how it works.)
You might be able to see it properly if you use a text editor like
GVim which is cross platform and knows how to handle different types of line endings
Please do this and let us know how it works, just to double check that there isn't actually a Windows-specific bug here.
Re: Export white list: no separators
Posted: Mon Jun 22, 2015 10:08 pm
by Kdmeizk
notepad++ (I have already this) can handle and displays correctly. So no problems finally here again, sorry.
Re: [CLOSED] Export white list: no separators
Posted: Tue Jun 23, 2015 1:15 am
by therube
That is pretty lame that notepad doesn't know how to handle an eol.
But should NoScript do more?
Can't it just check if OS = Windows, \r\n, else \n.
Or always use \r\n. Can't image there are such brain dead editors in Unix.
Re: [CLOSED] Export white list: no separators
Posted: Tue Jun 23, 2015 1:55 am
by barbaz
therube wrote:That is pretty lame that notepad doesn't know how to handle an eol.
But should NoScript do more?
Can't it just check if OS = Windows, \r\n, else \n.
I would imagine this wouldn't be too hard. It'd have to check for \r\n or \n on import though, but I can't imagine that'd be hard either.
OTOH just to work around a totally unrelated and unnecessary/replaceable program being lame, is it even worth Giorgio's effort when there are non-lame programs...
(And IIRC Notepad used to show a box for \n . Wonder what happened to that?)
therube wrote:Or always use \r\n
... which sometimes shows up as ^M followed by a newline in Unix?

Re: [CLOSED] Export white list: no separators
Posted: Tue Jun 23, 2015 3:21 am
by Thrawn
Why add an unnecessary character on every line? If you're at the level where you want to manually edit your whitelist, you probably should have a better tool than Notepad. Even WordPad understands LF characters.
If, on the other hand, CR-LF doesn't import properly, then that would be an issue worth fixing.