Symptom
-
When an HTML file is uploaded to a custom MDF object and subsequently downloaded, some javascript functions will appear in the file footer.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors HCM Suite
- Document Management
Reproducing the Issue
- Login to SF instance
- Go to People profile or manage data
- Upload an HTML file to custom MDF object.
- Save the file
- Download the uploaded HTML file
- Verify that the uploaded file is different from the downloaded file and some javascript functions appear in the file footer.
Cause
This is because the JavaScript functions already exists in the original file, but they were removed when the file was uploaded since the script tag could contain malicious JavaScript. When downloading it, the JavaScript function is restored and visible.
Resolution
- Before uploading the HTML file, remove the JavaScript and any calls to it to maintain a working HTML file.
- Alternatively, the JavaScript can be removed after downloading the file.
See Also
Refer to KBA2257047- Adding attachments on an MDF Object for attachment type field via Import.
Keywords
HTML, MDF object, manage document, file upload, file download, JavaScript, script tag, code removal, style alterations, attachment , KBA , LOD-SF-PLT-DOC , Document Management , Problem