Affects Version/s: 7.0.0 DXP FP9
Component/s: Item Selector
When creating a Web Content, we have the option to add a file in the Content section. It seems that the file chooser, or the Documents and Media uploader allows any file to be uploaded, when in reality it expects an image file.
Because of the open parameters (no restrictions on image type/extension), it seems unexpected when the Web Content add file functionality sets an img attribute in the HTML source.
Steps to Reproduce
1. Start up clean Liferay DXP SP1 bundle
2. Sign in as the administrator
3. In the default Liferay DXP site, go into Contents > Web Content
4. Add a new Web Content
5. Assign a title, and in the Content section, click +
6. Click the first icon (indicating an image/file icon)
7. In the file uploader, click Choose a file, and select a TXT file
8. After the file uploads, assert that a broken image icon is present
9. Check the source code of the Web Content editor
An img src is set for the text file
Either (1) make it clear that non-image files cannot be uploaded/used and set these limits on the file chooser, or (2) parse non-image links to be displayed as links to the downloadable file.