Target Blank
First of all, thank you for this great add-on to Nextcloud !
I'm trying to set some links with target blank to open them in new tabs/new windows.
I found some answer about how to handle it in Markdown, but it doesn't seem to work with CMS Pico in Nextcloud: https://stackoverflow.com/questions/4425198/can-i-create-links-with-target-blank-in-markdown
I did try [text](url){:target="_blank"} as suggested in the link above, however it ignores what's after the url and shows it as text.
Unfortunately that's not possible right now, because Parsedown, the Markdown parser Pico uses, isn't capable of doing so.
Thank you @PhrozenByte
I found that "parsedown-extra-plugin" may offer such function, do you think it can be added to Pico ?
https://github.com/taufik-nurrohman/parsedown-extra-plugin#automatic-relnofollow-attribute-on-external-links
Upstream discussion: https://github.com/erusev/parsedown/issues/494
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:
Sorry for reviving an old thread! I have just come across it and was wondering why this cannot be circumvented by specifying the link as HTML in the Markdown like
<a href="https://github.com/nextcloud/cms_pico" target="_blank">cms_pico</a>.
The link is shown but does not behave as hoped. Is this expected behavior? If so, is there any reason not to adapt it?
@sm8ps HTMLPurifier doesn't allow this by default. However, target="_blank" yields no threats in our scenario, so we should add it to the allow list. Thus I'm transforming this issue to an suggestion.
Great, thanks! I think this will be much appreciated by many users.
Any news on this? Where can this be added to the whitelist?
Thanks a lot!