secure-77 / Perlite

A web-based markdown viewer optimized for Obsidian

Home Page:https://perlite.secure77.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The symbol ( & ) in note names is replaced by ( &amp ) which breaks the graph links

SmartSceptic opened this issue · comments

Describe the bug

I use special characters in the name of notes in my knowledge base to determine the type of note.
At least, symbol ( & ) in note names is replaced by ( &amp ) on graph panel, with breaks the graph links, an lead to unexistent note.
When you go to such a note from the left panel, the graph is not updated, and when you go from the graph to such a note, a blank page opens.

Probably other special characters allowed in Windows for use in file names also lead to a similar error.

To Reproduce

  • Create note, with name beginning wit "&"
  • Try open note from graf view
  • Try open note from left tree panel

Expected behavior
The symbol ( & ) and other windows allowed symbols in note names is not changed in view.

Screenshots
My test few notes in graf (multiple node connections also look weird)
image

image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Google Chrom
  • Version Latest perlite 1.5.1
commented

I can reproduce this, seems that the html encoding should be replaced to url encoding for the links

commented

Well this will be fixed in release 1.5.2, but only for the ampersand, it seems that the json parser from php will decode some chars which then I need to replace back with JS, which is pretty ugly and need to be done for every (wrong escaped) char.

But at least the ampersand is fixed and I know what to do if there are more chars.

This issue is still persist in v1.5.4, clicking on the graph links leads to non-existent file.
e.g clicking on User & Root (User & Root in Graph View) node leads to http://localhost/?link=/test 1/User & Root instead of http://localhost/?link=/test 1/User & Root

image

commented

now also fixed for the global graph in 1.5.5