Skip to content

Iframes referencing local files not rendered in Logseq2 and rendered in Logseq OG #1166

Description

@ta32

Search first

  • I searched and no similar issues were found

What Happened?

In logseq OG
You can create iframes and embedded static html assets.
Renders correctly in logseq OG

Image

Using

<iframe src="file:///C:/dev/work/notes/radian-arc-length.html" width="100%" height="720" style="border: 0;" title="Interactive explanation of radians using arc length and radius"></iframe>

In logseq 2 the above markdown does not render anything.

Image

The embedd does work when serving the static html file from a local server, but the original logseq supported loading the static html files from the file system.

Reproduce the Bug

  1. Create a note
  2. <iframe src="file:///C://assets/radian-arc-length.html" width="100%" height="720" style="border: 0;" title="Interactive explanation of radians using arc length and radius"></iframe>
  3. place the html asset in the above folder

Use full path to the html asset

radian-arc-length.html

Expected Behavior

The html iframe should render like it does in Logseq OG
local files are allowed to be loaded by logseq

Screenshots

CTRL + SHIFT + I
Console logs:
"Not allowed to load local resource: "

I can see the asset that i embedded is blocked from loading in logseq2

Desktop or Mobile Platform Information

OS Version: Windows 11
Logseq 2: 2.0.1 Current Revision: b09316a
Logseq OG: 1.0.0 Current Revision: 680b371

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions