Gitea: HTML sanitizer doesn't allow centering of text

Created on 26 Feb 2020  路  8Comments  路  Source: go-gitea/gitea

Description

See the missing icon in the README of this mirror on try.gitea.io whereas the rendering on GitHub is flawless. (see #8830 for the image issue).

The text centering of the headline is lost.

Screenshots

Screenshot_20200226_083247

kinenhancement

Most helpful comment

see #10515 for dealing with the embedded html img tags ...

All 8 comments

The first issue is a duplicate of #8830

The second is because of our sanitizer not allowing align = "center".

If instead of writing html you used markdown syntax for the image - it would work as expected.

We don't currently munge the relative URL of a IMG elements - I guess we could and it is likely to be a very simple pr to do that.

The first issue is a duplicate of #8830

Ah I see. I searched for it and found nothing. I will remove the part about the relative path in this issue then.
Thank you for pointing out :+1:

If instead of writing html you used markdown syntax for the image - it would work as expected.

  1. It isn't _my_ repository. I just took a random repository from GitHub and mirrored it on try.gitea.io. I obviously can't control random repositories on the web. :wink:
  2. So the logic between Markdown and HTML rendering is diverged (= buggy)

see #10515 for dealing with the embedded html img tags ...

Awesome, thank you Andrew!

Thank you so much for fixing those both issues, @zeripath.
I'm afraid I found another markdown/html rendering issue which isn't fixed in the current build on try.gitea.io. Or is the current master not yet deployed?

Screenshot_20200228_231225

Should I open a new issue for this or recycle this one?

Open a new one

done. Thank you again for fixing those issues so fast.
And you are even _answering_ blazingly fast. :wink:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BNolet picture BNolet  路  3Comments

thehowl picture thehowl  路  3Comments

lunny picture lunny  路  3Comments

jonasfranz picture jonasfranz  路  3Comments

Fastidious picture Fastidious  路  3Comments