I am using Rich Text Editor for accepting input data which has HTML content from client side.
On the server side, I am using PHP based server and sanitize the incoming data.
Is there a builtin PHP functionality, which retains the HTML code and removes the presence of Javascript for XSS + SQL injection codes.