silverstripe-docsviewer icon indicating copy to clipboard operation
silverstripe-docsviewer copied to clipboard

Reference style images are broken if using a relative path

Open Taitava opened this issue 7 years ago • 0 comments

a) This works:

![Alt text](/path/to/img.jpg)

b) This doesn't:

[id]: /path/to/img.jpg
![Alt text][id]

The difference is that a gets an absolute url when parsed, whereas the path of b won't get translated to absolute in the final output. SilverStripe "pushes" themes to use <base href="..."> tag which unfortunately invalidates relative urls. So to fix this, b should be converted to an absolute url too. (Or, is it possible to remove the <base href="..."> tag from DocumentationHead.ss template?).

Please let me know if you need any more information or if you can point out where I should look in the code in order to create a pull request myself. Thanks! :)

Edit: Forgot to say that I'm currently using SilverStripe version 3.5.3.

Taitava avatar Dec 29 '17 21:12 Taitava