in my texteditor:
(image: 01.jpg alt: Das Café)
in the browser:
<figure><img alt="Das Café" src="/media/pages/vereinscafe/2dd73d1bae-1762184621/01.jpg"></figure>
How can this conversion into entities be prevented?
Thanks : )
in my texteditor:
(image: 01.jpg alt: Das Café)
in the browser:
<figure><img alt="Das Café" src="/media/pages/vereinscafe/2dd73d1bae-1762184621/01.jpg"></figure>
How can this conversion into entities be prevented?
Thanks : )
Why do you want to prevent it? Or what is the problem you are facing?
Hi Sonja.
Unnecessary entities make the source code difficult to read, for example when debugging.
There is no need to escape a Unicode character “é” as an entity.
Kirby doesn’t do that with other content either.
So it’s also about consistency.
Andreas
Non-ASCII characters are HTML entity encoded in Kirby in the context of HTML attributes for security reasons.
We can probably discuss, which characters exactly should or shouldn’t be encoded, but then, the source code is not for reading your documents.
But to answer your question: If you want to get rid of the encoding, you need to overwrite the image kirbytag (or other kirbytags that might do this) with your custom version that doesn’t use Html::img().
Could you explain the security reasons? If you find the time for that. I’m curious.
I find it hard to imagine that umlaut entities increase security compared to Unicode characters.
Perhaps you were thinking of characters that play a role in HTML syntax, such as “<” and “>”. That makes sense immediately.
Back to my motive:
Of course, I read the content in the editor or text file. But compared to other CMSs, Kirby produces excellent, “clean” and tidy code. From this perspective, it seems natural to me to avoid unnecessary encoding in entities.
It’s just a suggestion : ) It just struck me.
Regarding your suggestion to overwrite the kirbytag image: I don’t have the skills to do that.