barley123 1 Posted April 18, 2020 Share Posted April 18, 2020 I have tried making a note and exporting it as html. https://pastebin.com/raw/0hf2DP85 The html page opened fine in a web browser https://i.imgur.com/CXCKT9f.png Once can put the HTML in a tidier https://www.freeformatter.com/html-formatter.html I looked at the html and I noticed some errors in the syntax of it Some noticable by eye, but other significant errors show in a validator https://validator.w3.org/#validate_by_input+with_options https://validator.nu/ For example Quote <a name="407"/> I'm no expert but it seems to me that that's not valid HTML Putting aside the name attribute That's "Self-closing syntax (/>) used on a non-void HTML element." I'm no expert but I think Anchors should be closed like this <a>...........</a> And has been that way for decades and since they were created. There are other errors too like div inside span, and obsolete tags and attributes. And an HTML validator mentions these. Link to comment
Level 5* DTLow 5,749 Posted April 18, 2020 Level 5* Share Posted April 18, 2020 3 hours ago, barley123 said: The html page opened fine in a web browser "opened fine" works for me Fortunately, most browsers are tolerant of html errors >>I looked at the html and I noticed some errors in the syntax of it What's the source for this html code Could this be imported from a web clipping? Evernote's stores data in enml format It's basically html, but some conversion is required in import/export Link to comment
barley123 1 Posted April 18, 2020 Author Share Posted April 18, 2020 this, you see the <a.../> and other stuff mentioned. note123.enex Link to comment
barley123 1 Posted April 18, 2020 Author Share Posted April 18, 2020 no prob, here http://ge.tt/1OWhMd23 Link to comment
Level 5* DTLow 5,749 Posted April 18, 2020 Level 5* Share Posted April 18, 2020 45 minutes ago, barley123 said: this, you see the <a.../> and other stuff mentioned. note123.enexUnavailable I imported your .enex file and then exported as an .html file Link to comment
barley123 1 Posted April 18, 2020 Author Share Posted April 18, 2020 interesting, your one looks much better and even has the doctype tag. maybe the windows version of evernote has the issue and the mac one is ok I am on 6.24.2.8919 for Windows. My OS is win 7. Though it says CE Build in the screenshot below. This is the HTML file that it exports the .enex to/as http://ge.tt/2xDlNd23 when I export it note1.html Link to comment
Level 5* DTLow 5,749 Posted April 18, 2020 Level 5* Share Posted April 18, 2020 8 hours ago, barley123 said: I have tried making a note and exporting it as html. I'm wondering at your user case for exporting in html format I use the format for my backup files - readable by any web browser app - accessible in the OS file system Link to comment
John in Michigan USA 140 Posted April 18, 2020 Share Posted April 18, 2020 8 hours ago, barley123 said: I'm no expert but I think Anchors should be closed like this <a>...........</a> And has been that way for decades and since they were created. Ideally it should validate, but, lots of html, xml, or in this case enml doesn't validate. It is a pervasive problem. Most browsers and parsers are tolerant of this, been that way since Mosaic. the name= attribute I believe is defined in enml but not in html The EN exporter appears to have created a typo, <a name="407"/> should be <a name="407" /> then it would validate I think. Link to comment
barley123 1 Posted April 18, 2020 Author Share Posted April 18, 2020 11 minutes ago, John in Michigan USA said: Ideally it should validate, but, lots of html, xml, or in this case enml doesn't validate. It is a pervasive problem. Most browsers and parsers are tolerant of this, been that way since Mosaic. the name= attribute I believe is defined in enml but not in html The EN exporter appears to have created a typo, <a name="407"/> should be <a name="407" /> then it would validate I think. If you check an HTML validator you will see that it won't and even your anchor line has wrong syntax. (I think I wrote the correct syntax for an anchor in my first post of this thread). And any validator will tell you It's very quick to test HTML if it is valid , in a validator, You can check it in less than 2 minutes. Go to a validator iike one I mentioned https://html5.validator.nu/ (or the w3 one if you prefer), and you get an option to choose 'text-field' where you can paste in html, and you can try pasting in HTML and click the validate button and see you will see what it tells you, Link to comment
John in Michigan USA 140 Posted April 21, 2020 Share Posted April 21, 2020 On 4/18/2020 at 4:53 PM, barley123 said: If you check an HTML validator you will see that it won't and even your anchor line has wrong syntax. (I think I wrote the correct syntax for an anchor in my first post of this thread). And any validator will tell you It's very quick to test HTML if it is valid , in a validator, You can check it in less than 2 minutes. Go to a validator iike one I mentioned https://html5.validator.nu/ (or the w3 one if you prefer), and you get an option to choose 'text-field' where you can paste in html, and you can try pasting in HTML and click the validate button and see you will see what it tells you, You're right about the <a> tag. I'd forgotten that <a> is a non-void tag, even when it doesn't have the href attribute. If they ever update that part of the exporter, which is unlikely, they should probably make it output <a id="407"></a> Link to comment
barley123 1 Posted April 21, 2020 Author Share Posted April 21, 2020 10 minutes ago, John in Michigan USA said: You're right about the <a> tag. I'd forgotten that <a> is a non-void tag, even when it doesn't have the href attribute. If they ever update that part of the exporter, which is unlikely, they should probably make it output <a id="407"></a> Or better just not have that anchor there at all, I don't think it's doing much. I don't see it in the MAC version DT showed, which validates much better even has a doctype tag and is really well formatted too. They should fix the export in windows so it's as good as the export on their mac version. 1 Link to comment
Level 5 PinkElephant 8,934 Posted April 21, 2020 Level 5 Share Posted April 21, 2020 Probably yes, although the Mac and the Windows version run on very different platforms. On the Mac, each note is stored as a folder, with the content inside. On Windows, the EN client runs as a data base file. So probably the two export routines do not have much in common. If you want to follow up on this, you can post a feature request in the windows forum. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now