RobertWeinmeister / dokuwiki-mermaid

A plugin for DokuWiki to support Mermaid.
GNU General Public License v2.0
3 stars 0 forks source link

Search highlight crash #20

Closed tumd closed 7 months ago

tumd commented 7 months ago

Description When using the search-functionality in Dokuwiki, the entered page will highlight the words searched for. This is done with an url-query; /page?s=word. When such searched for word is also a key in a mermaid diagram, the diagram will crash.

Mermaid code Add the following to dokuwiki page on the URI /test;

<mermaid>
graph LR;
    eat-->sleep;
    sleep-->code;
    code-.repeat.->eat;
</mermaid>

Use the Dokuwiki search and search for sleep. Enter the test-page from the search-result. This will give you the URI /test?s[]=sleep showing a crashed mermaid diagram. The same will happen when the words eat & code is highlighted. But for some reason not for repeat.

Actual behaviour Crashed diagram.

Expected behaviour No crash.

Versions DokuWiki: Release 2023-04-04a "Jack Jackrum" Plugin: 2023-11-17 Mermaid: locally hosted, version 10.6.1 (CJS)