security - SVG source code via PHP form -
i use online photo editor on web store. user can edit photo using svg-edit , save changes. user results stored svg source code (...). have send svg source code through php form, save in database , show in administration panel. i'm afraid of injections or attacks on web store. there possibility make secure? i can't generate private hash svg source code, because it's client side , request can make via ajax. @edit example: user saves ... code , code being sent through post. in php script can access $svg = $_post['svg_source']; worring injection in post value. attacker may inject html, js, other, source code. @edit: and in db can store $_post value ... , view in pa. attacker can write ... code , executed in pa view svg image (based on svg code) @edit: i need solution check svg code valid , don't contain js, html code. or - need solution secure viewing svg code on website. consider wrapping user input mysql_escape_string() before storing...