For example, I have a tool with Javascript support . You use links to add html-blocks of elements (for example, input fields) and TinyMCE for editing text. They are saved using the autosave function, which makes an AJAX call in the background for certain events.
The save function is called, the database is protected, but I'm wondering if the user can manipulate the DOM to add anything that he wants (like custom HTML or an unwanted script).
How safe is this , if at all?
The first thing that comes to mind is that I probably should look for and remove inline javascript from the resulting HTML code.
Using PHP, jQuery, Ajax.
source
share