1

I realise there are several rich text editors for jQuery but I cannot find any that have an associated class that does the filtering and cleaning required to accept the input into a database.

Does such a class exist?

I am particularly interested for a PHP library, but .NET would be interesting too.

4

1 に答える 1

0

FCKeditor を使用すると、DB に書き込むことができるクリーンな HTML または XHTML (editor.GetXHTML()) を取得できます。

実際には、DB に何を書き込むかはそれほど重要ではありません。通常は元の HTML を記述するためです (必要に応じて、いつでもそこから危険なタグを取り除くことができます)。XSS 攻撃を防ぐには、コンテンツを Web ページに表示する前に適切にエンコードすることが不可欠です。.NETの場合、CodePlex.com にそのためのAntiXSS ライブラリがあります。

PHP については、次のライブラリを参照してください。

また、この記事:

于 2009-03-27T11:31:17.280 に答える