Skip to content
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

Preview doesn't work when editing HTML file #2384

Closed
zexxar opened this issue Oct 2, 2019 · 4 comments
Closed

Preview doesn't work when editing HTML file #2384

zexxar opened this issue Oct 2, 2019 · 4 comments

Comments

@zexxar
Copy link

zexxar commented Oct 2, 2019

Hi,

I think there is a bug with the preview when editing HTML files. Because when you click on the preview it shows nothing.

html
preview

Thank you.

@aadrian aadrian added the bug label Oct 2, 2019
@takezoe
Copy link
Member

takezoe commented Oct 20, 2019

Actually, this is not a bug. Preview rendering is available for Markdown and other formats supported by installed plugins. It doesn't work for HTML.

I think HTML preview shouldn't be supported without restriction because it can cause cross-site scripting if HTML contains JavaScript.

@aadrian
Copy link
Member

aadrian commented Oct 20, 2019

Actually, this is not a bug. Preview rendering is available for Markdown and other formats supported by installed plugins. It doesn't work for HTML.

The pages-plugin plug-in is allowed to render HTML.

Without the HTML preview, the users will do allot of small commits, and changes, since they can't see what they're really doing.

I think HTML preview shouldn't be supported without restriction because it can cause cross-site scripting if HTML contains JavaScript.

IMHO just like in the case of the 'pages-plugin', a subdomain (+ iframe) and the section https://github.com/gitbucket/gitbucket-pages-plugin#security-panic-mode would simply do it.

@aadrian aadrian added improvement and removed bug labels Oct 20, 2019
@takezoe
Copy link
Member

takezoe commented Oct 20, 2019

The pages-plugin plug-in is allowed to render HTML.

Yes. Though GitBucket itself doesn't support HTML rendering due to prevent cross-site scripting, users can use pages-plugin if they need to host HTML on GitBucket. It's can be disabled, so users can use it at their own risk.

@takezoe
Copy link
Member

takezoe commented Dec 10, 2019

I close this issue since this is designed behaviour.

@takezoe takezoe closed this as completed Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants