Some .gmi files are displayed as plain text on my page #223
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#223
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have started a gemlog page on my site and for some reason Bombadillo is showing the post files as plain text while it displays all regular pages as gemini text. This happens with two different servers with the same content, I am not sure if that is a server error or a client error, it works with e.g. Lagrange or the Gemini web proxies but it does not work with Amfora either.
my page is at gemini://alexlehm.pollux.casa/
I have no problems loading the given address as
text/gemini
in the current version of bombadillo.What version are you running? There are two ways to find out:
bombadillo -v
:version
In general bombadillo will only render a gmi file as gemtext if the status code from the server indicates a mime type of
text/gemini
. If anything other than that is sent by the server, bombadillo will render the file as plain text (unless it is an image: png or jpg; in which case it will attempt to render the image in braille characters).Let me know what you find :)
I believe the server sends text/gemini (when I run a cli request, I get text/gemini lang=en)
I use Bombadillo version: 2.3.3 (in fact I run that on rawtext.club since I just joined the site)
This url does not work for me:
gemini://alexlehm.pollux.casa:1965/gemlog/2023-Feb-12.gmi
I probably have messed something up with the files but I am not getting what
The mime type looks ok:
It is rendering fine as gemtext. But gemtext is not html. You have put a bunch of html into your gemtext. So if you are expecting
<p>
and<a href="...">...</a>
tags to render... that wont happen in a gemtext document. You need to use the gemtext format. Here is an introduction to gemtext.You are certainly welcome to serve html over the gemini protocol. But most clients wont render it as html and will just display it as
text/plain
. The reason some other browsers displayed your file the way you expected it is because they are using a web renderer for their gemini client. As such, they are converting gemtext to html and then rendering. Since you are already using html in your gemtext it just rendered... because they are not escaping html in the gemtext content. This is actually something that can potentially allow javascript injection attacks, to a certain degree. What clients displayed your links and p tags the way you expected them? I'm happy to reach out to those developers and let them know about the security vulnerability.It is not rendering the sections with the dates either. the
tags come from my converter script, that is not a good example.
Currently in bombadillo it looks like this:
Lagrange does not render the p tags either, but it displays the date entries
I think I found what my thinking error is, the tty client does not render headings and displays # headling instead while the graphical client uses a larger font. Then it is completely correct and I just have to clean up the HTML to convert it to gemtext properly
Ah. yes! Bombadillo just displays the heading level (I think it may bold a top level heading, but I cannot remember) withe
#
char since the tty cannot display in variable font sizes.Good to hear that Lagrange is not rendering the P tags either.
I am working on converting the html tags to gemtext now