oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.33k stars 746 forks source link

Markdown relative links are broken #2775

Open JozoVilcek opened 5 years ago

JozoVilcek commented 5 years ago

Opengrok shows markdown README.md content, but if it contains relative links to other markdown files (such as browsing documentation), those links are not working.

At demo site for showdown (library used by opengrok), relative links do work for version 1.8.4 which is currently used but no in opengrok. http://demo.showdownjs.com/

idodeclare commented 4 years ago

Not a bug. OpenGrok XSS filtering prevents relative links.

Also, I think the implied use case is showing other linked markdown, which is not implemented. I.e. even if local links were allowed, it would link to the OpenGrok xref and not anything markdown-formatted.

A possible enhancement would be to allow relative markdown links within showdown and to add a special file-type-dependent formatted mode. Such a mode would be useful for converting Troff and Mandoc from their grandfathered old-school presentation to be regular source-code xref viewers — but letting users activate the special formatted mode.