xiota / geany-preview

Turns Geany into a markdown editor by providing a preview pane in the sidebar to show the formatting of several light-weight languages as they are edited. Supported document types include AsciiDoc, DocBook, Fountain, HTML, LaTeX, Markdown, MediaWiki, reStructuredText, Textile, and Txt2Tags.
GNU General Public License v3.0
12 stars 0 forks source link

preview should not execute html-code of txt-documents #24

Closed ralf3u closed 2 years ago

ralf3u commented 2 years ago

Steps to reproduce Add the following code in a txt-document somewhere on the first page:

<body style="background:gray">

Result: The background of Preview is gray.

Expectation Preview should not execute html-code of txt-documents. In the browser Firefox and in the browser Web html-code of txt-documents is not executed.

xiota commented 2 years ago

What is the name of the file? It is probably being detected as a different filetype. I'll check if there's some other issue.

ralf3u commented 2 years ago

What is the name of the file?

The name of the txt-document is geany_test.txt. The content of the txt-document is the report of this issue.

xiota commented 2 years ago

Plain text documents are not supposed to show up in the preview (because they're just a duplicate of what's in the editor). So there's something wrong with filetype detection.

ralf3u commented 2 years ago

... there's something wrong with filetype detection.

Should I do something? All my txt-documents are shown in the Preview.

xiota commented 2 years ago

I just checked the code. Apparently I changed it at some point to show in the preview. I am looking into fixing it and will update the PPA soon

ralf3u commented 2 years ago

... will update the PPA soon

Well, as I mentioned before, it is not necessary because I wanted to use the auto-sidebar anyway.

xiota commented 2 years ago

Well, as I mentioned before, it is not necessary because I wanted to use the auto-sidebar anyway.

Okay. Will update when it's done. (Pretty much already done, but has performance issues.)

xiota commented 2 years ago

Fixed in 6a6f7c8a167de859135fa95a16e8141b43582331.

ralf3u commented 2 years ago

Fixed in 6a6f7c8.

I can confirm.