nicEditor で html タグを書き込まないようにしたい。
<div id="sample">
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> <script type="text/javascript">
//<![CDATA[
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
//]]>
</script>
<textarea onblur="this.value = this.value.replace(/<\/?[^>]+>/gi, '')" name="process" style="width: 300px; height: 100px;" id="process">
hello <b>world</b>
</textarea>
</div>
上記の正規表現を試しましたが、機能しません..onblur="this.value = this.value.replace(/<\/?[^>]+>/gi, '')"
単純なテキストボックスに同じ正規表現を使用していますが、正常に機能します。
また、セキュリティ上の目的でユーザー入力から html タグを防ぐ適切な方法はありますか?