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

DEV: Fix invalid markup #6

Merged
merged 3 commits into from Nov 5, 2021
Merged

DEV: Fix invalid markup #6

merged 3 commits into from Nov 5, 2021

Conversation

hnb-ku
Copy link
Contributor

@hnb-ku hnb-ku commented Nov 5, 2021

W3 validator says:

The element iframe must not appear as a descendant of the element

The component currently appends the iFrame to the attachment <a> tag, resulting in invalid markup. This PR fixes that by adding the iFrame tag after the attachment <a> tag.


This PR also makes a small adjustment that makes it possible to override the display mode if it's set to "inline" on a per-file basis.

If the global theme setting is set to "inline" and the file starts with a whitespace, don't render it inline, and instead of ignoring it, make it open in a new tab on click.

If the preview mode is set to "inline" and the filename starts with a whitespace, open it in a new tab instead of ignoring the PDF.
@eviltrout eviltrout merged commit ee4012f into discourse:main Nov 5, 2021
@eviltrout
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants