What functions does WordPress use for filtering / sanitizing comments?

You can use wp_filter_kses() and then wp_unslash to filter the content.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)