Writing XSS Filter for (X)HTML Based on White List
问题 I need to implement a simple and efficient XSS Filter in C++ for CppCMS. I can't use existing high quality filters written in PHP because because it is high performance framework that uses C++. The basic idea is provide a filter that have a while list of HTML tags and a white list of options for these tags. For example. typical HTML input can consist of <b> , <i> , tags and <a> tag with href . But straightforward implementation is not good enough, because, even allowed simple links may