I have discovered this while working on MDL-45256. The current design and implementation of portfolio_rewrite_pluginfile_urls() does not seem to be quite correct. Even if portfolio_rewrite_pluginfile_url_callback() suggests that the href attribute is supported, it's actually working well for images only.
Steps to reproduce
- Enable File download portfolio
- Create a forum post with the sentence like
Click here to download the image.
- Make sure the "here" word acts as a link to embedded file.
- Export the post to portfolio (File download).
Expected result:
ZIP with the post HTML and embedded files stored in the "site_files" folder is downloaded. The "here" link is still there, referring to the file in the site_files (relative URL).
Actual result:
The "here" link is completely replaced with a code like
Click <img href="@@PLUGINFILE@@/image.png" src="site_files/image.png"/> to download the image.
|