4

tinyMCE の最新バージョンは、使用時に埋め込みタグと JavaScript を削除しています。verify_html フラグを false に設定してみましたが、うまくいきませんでした。これがtinyMCEの設定jsです。誰かが私が間違っていることを見ることができますか?

更新:サーバー側の問題ではないと確信しています。tinymceをロードせずにプレーンテキストエリアを使用しましたが、完全に機能しました。ストリッピングを行うのはtinyMCEです。

tinyMCE.init({
    // General options
    mode: "textareas",
    theme: "advanced",
    plugins:
safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,
insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,
fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
    valid_elements: "*[*]",
    verify_html : false,


    // Theme options
    theme_advanced_buttons1:     
    bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,
justifyfull,|,formatselect,fontselect,fontsizeselect|,ltr,rtl,|,fullscreen|,forecolor,
backcolor,code",
    theme_advanced_buttons2: 
    "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,
outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,advhr",
    theme_advanced_buttons3: 
"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media",
    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    theme_advanced_statusbar_location: "bottom",
    theme_advanced_resizing: true,
    height: "500px",

    // Example word content CSS (should be your site CSS) this one removes paragraph
   // margins
    content_css: "content/word.css",

    // Drop lists for link/image/media/template dialogs
    template_external_list_url: "lists/template_list.js",
    external_link_list_url: "lists/link_list.js",
    external_image_list_url: "lists/image_list.js",
    media_external_list_url: "lists/media_list.js",

    // Replace values for the template plugin
    template_replace_values: {
        username: "Some User",
        staffid: "991234"
    }
});
4

1 に答える 1

3

更新#2

さらに掘り下げた後、次のことを試してください。

設定:

media_strict: false

<embed>そして、タグの設定を設定します:

+'embed[width|height|name|flashvars|src|bgcolor|align|play|loop|quality|allowscriptaccess|type|pluginspage]'

ソース ( MoxieCode フォーラム)


更新

を設定していますが、 valid_elementsextended_valid_elementsを設定していませんか?:

valid_elements: "*[*]"

extended_valid_elements現在のルールセットに使用されます。ただしvalid_elements、実際にそのルールセットを作成できます。


古い答え:

サーバー側のリクエストを解析しているものではなく、TinyMCE がそれを実行していると確信していますか?

ASP.NET を使用している場合はValidateRequest="False"、ページに が設定されていることを確認してください。ASP.NET MVC を使用している場合は、コントローラー アクションの上に次を配置する必要があります。

[ValidateInput(false)]

ただし、少なくともホワイトリストを使用して悪いものを締め出していることを確認してください。

于 2009-06-11T16:36:44.247 に答える