php - Filtering <iframe> src attribute -
i have website allows user embed videos using <iframe>
tags such .
<iframe width="560" height="315" src="http://www.youtube.com/embed/se2p7hjpane" frameborder="0" allowfullscreen></iframe>
however, not idea since can input website on src attribute , not video. such <iframe src="http://www.google.com"/>
is there anyway handle this?
parse urls submitted , filter them through whitelist. aren't on list either discarded or put in queue administrator approval.