Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的功能
我无法获得将删除 on* 属性的正则表达式
public function removeUnsafeAttributes($input, $validTags = '') { $regex = ""; return preg_replace($regex,strip_tags($input, $validTags)); }
谢谢!
这将做:
/on[A-Za-z]*?\=\".*?\"/