Skip to content

Parsing error when using asciidoctor #8545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
proailurus opened this issue Oct 16, 2019 · 5 comments
Closed
2 of 7 tasks

Parsing error when using asciidoctor #8545

proailurus opened this issue Oct 16, 2019 · 5 comments

Comments

@proailurus
Copy link
Contributor

proailurus commented Oct 16, 2019

  • Gitea version (or commit ref): 1.9.4
  • Git version: 2.23.0
  • Operating system: openSUSE Tumbleweed 20191012
  • Database (use [x]):
  • asciidoctor version: 2.0.10
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant (the test instance doesn't support AsciiDoc)
  • Log gist: (couldn't find anything in logs pertaining to external renderers)

Description

When using asciidoctor as external renderer for AsciiDoc files, a superfluous string appears in the output at the beginning of the file:
lang="en">

This seems to be part of asciidoctor's html output, for some reason gitea doesn't filter it out.
The rest of the AsciiDoc file is displayed correctly in gitea's web interface.

I'm using the default asciidoctor config described here:
https://docs.gitea.io/en-us/external-renderers/

Screenshots

https://i.imgur.com/PBewpAz.png

@stale
Copy link

stale bot commented Dec 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Dec 15, 2019
@anthonyvdotbe
Copy link
Contributor

This is a valid issue & shouldn't be closed

@stale stale bot removed the issue/stale label Dec 15, 2019
@lunny
Copy link
Member

lunny commented Dec 16, 2019

There is a new sectioon on https://docs.gitea.io/en-us/external-renderers/ about sanitizer maybe help you.

@anthonyvdotbe
Copy link
Contributor

AFAICT, the purpose of that is to avoid certain attributes from getting stripped by Gitea. To solve this issue, there should be a way to do the exact opposite: tell Gitea to strip certain attributes. I tried with the section below, but it doesn't help:

[markup.sanitizer]
ELEMENT = html
ALLOW_ATTR =
REGEXP =

@anthonyvdotbe
Copy link
Contributor

@lunny this can be closed: it's a duplicate of #8676, which is fixed in v1.11.0

@lunny lunny closed this as completed Jan 8, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants