"Insert CSS File" Generates Unescaped Relative Path

Viewed 4

Description

The Insert CSS File Custom Rule action writes a relative path to the CSS file
with an unescaped space in the path. This breaks CSS loading whenever the
exported HTML is opened from any location other than a specific relative
position to ~/Library.

Documentation Reference

The Marked 3 Custom Processor docs describe Insert CSS File as:

"Injects a selected CSS file into the document. This will be loaded after
any Style selection and can be used to override existing styles or add
new ones."
— https://markedapp.com/help/Custom_Processor.html

No mention is made of relative paths, path encoding, or portability
limitations. The implication is that the injected CSS will load correctly.
3. Export the document as HTML
4. Move the exported HTML to any other folder
5. Open the HTML in a browser

Expected Behavior

Insert CSS File should write either:

  • An absolute file:/// URI with properly URL-encoded spaces
  • Or inline the CSS contents directly into a <style> block

Actual Behavior

Generates:

<link rel="stylesheet" href="../Library/Application Support/Marked/marked-hebrew/hebrew-kriah.css">

Problems:

  • Space in Application Support is not URL-encoded as %20
  • Relative path resolves incorrectly from any location other than ~/Downloads/ or similar
1 Answers

Man, where were you when I was beta testing :)? I'll have this fixed today as well.