Add Attribute in Pre WordPress

မနေ့ညက တစ်ညလုံး မအိပ်လိုက်ရဘူး။ အဲဒီ wordpress ဒုက္ခပေးနေတာနဲ့ပဲ။ ဘာပြဿနာလည်းဆိုတော့ ခွဲခြားခွဲခြား လုပ်တာပဲ။ admin , editor role ဆိုရင် <pre name=”code” class=”xhtml”> လို့ရေးပြီး publish လုပ်ရင် လက်ခံတယ်။ အဲ.. အခြား role သာဆိုရင်တော့ <pre> လို့ပြောင်းသွားတယ်။ အဲမှာ ပြဿနာစတွေ့တာပဲ။ အစက tinymce editor ပြဿနာထင်ပြီး အချိန်ကုန်ခံပြီး ကလိတယ်။ မရဘူး။ ၁ ရက် ကုန်သွားတယ်။ ၆ ရက်နေ့ဆို site က စတော့မှာ အဲဒီ အချက်မရရင်လည်း site က အဓိပ္ပာယ်မရှိတော့ဘူး ဖြစ်နေတယ်။ အဓိက google syntax highlighter တွေကို register လုပ်ထားတဲ့ author တွေကို သုံးစွဲစေချင်တာ။ ဒါနဲ့ ဒီမနက် ထပ်ရှာတော့..

http://orangescale.net/log/2007/06/sanitizing-html-tags-in-wordpress-mu/ site လေးကို တွေ့သွားတယ်။ အဲမှာမှ… ဟုတ်သားပဲ.. စမ်းကြည့်ရမယ်ဆိုပြီး wp-include\kses.php မှာ

‘pre’ => array(

‘style’ => array(),

‘width’ => array ()),

ကို

‘pre’ => array(

‘style’ => array(),

‘name’=>array(),

‘lang’=>array(),

‘class’=>array(),

‘width’ => array ()),

လို့ပြင်လိုက်တယ်။ အခုတော့ goolge ကြီး နဲ့ blogger တွေရဲ့ မျှဝေမှုကြောင့် အားလုံး အဆင်ပြေသွားပါပြီဗျာ။

2 responses to “Add Attribute in Pre WordPress”

  1. ဘာဆိုဒ်တွေ လုပ်နေပြန်တာတုန်းဗျ။

    1. ဟဲဟဲ.. လာတော့မယ်လေ… ခဏလောက်စောင့်… ကိုယ့်မွေးနေ့အတွက် ကိုယ့်ဘာသာကိုယ် အထိမ်းအမှတ် site လေးပေါ့.. ဟိဟိ

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Saturngod

Subscribe now to keep reading and get access to the full archive.

Continue reading