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

Feat: Allow HTML tags in markdown files #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msaliharslan
Copy link

I used to use obsidian and in my notes I have embedded youtube videos with iframe HTML tags. It was nice to be able to watch them without leaving my notes. I added rehype-raw package to handle HTML tags within notes. With this ORUI can display youtube videos within side panel as well as other HTML tags.

Currently I only added HTML support for markdown files, but it can be added to org files as well with the same package according to uniorg-rehype

@tefkah
Copy link
Contributor

tefkah commented Jul 13, 2022

Hmmm I'm somewhat hesitant about adding this as I'm planning to at some point build orui out into a more public facing application and i don't really want people to rely on this too much for security and performance reasons, but oth I'd like to add MDX support at some point as well which is even worse on both metrics.

Could you maybe add rehype-sanitize to this to make it a bit safer? Again, not super important for this local app, but I don't want people to rely on unsafe behavior

@msaliharslan
Copy link
Author

I can but rehype-sanitize removes all the iframe tags. There is a possibility of configuring it to allow iframes, but then I guess it does not really make the content any safer. All the unsafe behavior can be in iframes. I want to embed third party online content (mainly youtube videos) to my notes. Is there a way to check if the third party document embedded is safe? I saw remark-iframes. Maybe, this can be used to allow only youtube, however, this is not flexible and I need to change my notes.

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

Successfully merging this pull request may close these issues.

2 participants