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
- Make sure the "here" word acts as a link to embedded file.
- Export the post to portfolio (File download).
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).
The "here" link is completely replaced with a code like