PDF links display issue when Note is exported to HTML

Testing version: Version 2.1.7 (12566)

What were you doing: Exporting Note with PDF attachments to HTML

What feature did you use: Note Export

What happened: if a PDF is set to “Hide Preview” when the note is exported to HTML the resulting HTML code is missing the object tag that displays a preview of the PDF in web page (which is probably the intended result) however if the title of the PDF has any spaces in it the anchor text of resulting href link had %20 instead of spaces, which makes the web page links very difficult to read.

The code and images below are the results of exporting a note with two PDF’s… the first PDF is set to “hide preview” the second PDF is set to the default preview (the PDF’s are titled accordingly for demonstration purposes)

<p><a href='PDF%20Export%20test/PDF%20Document%20with%20Preview%20Hidden.pdf'>PDF%20Document%20with%20Preview%20Hidden.pdf</a><br>
<object data="PDF%20Export%20test/PDF%20Document%20with%20Preview.pdf" type="application/pdf" class="pdf_preview">
<p><a href="PDF%20Export%20test/PDF%20Document%20with%20Preview.pdf">PDF%20Document%20with%20Preview.pdf</a></p>

What did you expect to happen: when a note containing PDF’s is exported to HTML it either… 1) always includes the html object tag code so any PDF’s are seen in a preview window within the webpage. or 2) if the PDF is set to “hide preview” the anchor text of the corresponding href tag replaces any %20 in the PDF title with actual spaces.

The %20 are the correct way to handle spaces in URLs accordingly to the standard. Removing those will cause the URL to not work if the page is upload somewhere and don’t cause any issue if file are locally available.

Maybe I am misunderstanding something, or just used inaccurate language to describe what I was thinking. I agree that the %20 are the right way to handle spaces in the name of the linked file itself, but I thought the anchor text of the href is just the visible text and doesn’t effect the actual link itself?

oh yes, that’s wrong. Will be fixed with the next update.

1 Like

thanks for clearing up that confusion and working on a fix. I really appreciate how responsive you are to feedback and all the hard work you guys do to keep making the app better.

1 Like