I use textarea to put "javascript/jquery" syntax can not be displayed normally

Support General I use textarea to put "javascript/jquery" syntax can not be displayed normally

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39848
    369cycle369cycle
    Participant

    metabox textarea

    show textarea

    I use textarea to put "javascript/jquery" syntax can not be displayed normally

    <div id="liteshop-order-form-122456"> </div>
    <p>var checkReady = function (callback) { if (window.jQuery) {callback(jQuery);}else { var jq = document.createElement('script');jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js";jq.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(jq); window.setTimeout(function () {checkReady(callback);}, 100);}}; checkReady(function ($) {jQuery.getScript("https://liteshop.tw/assets/liteshop.js", function () { jQuery('#liteshop-order-form-122456').liteshop({"u":"dfHFb2","notify":"無","product_token":"teCMond44fqpuU3e1MMYfnwE"});});});</p>
    
    #39867
    PeterPeter
    Moderator

    Hello,

    If you want to add the script code to the textarea field, you need to bypass the sanitization. Please read more on the documentation https://docs.metabox.io/sanitization/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.