www.kkoba.com  » kkobaのblog

2004年08月19日

[MT3.0] 文字化けが多発

「さぁ、テンプレートをいじろうか」と思ったら、文字化けが多発してそれどころじゃなかった。 気づいただけでも以下の通り。

  1. mt.cgiが書き出すBlogのタイトル
  2. mt.cgi内で、Blogのタイトル
  3. mt.cgi内で、エントリー一覧画面のエントリー

1は、下記のようなMain Indexテンプレート以下のように修正した。

旧 <$MTBlogName encode_html="1"$>
新 <$MTBlogName$>

2と3は、/lib/MT/App/CMS.pmの中を以下のように修正し、encode_htmlしないことにより解決した。

旧 $param->{blog_name}
      = MT::Util::encode_html($blog->name);
新 $param->{blog_name}
      = $blog->name;

メールタイトルの文字化け対応は、困るのは自分だけなので、ひとまず後回し。

追記1

その後コメント確認画面での文字化けが出て、きりがなくなったので、文字化けはMT::Util::encode_htmlを修正することにより対応した。

/lib/MT/Util.pmの325行目を修正

旧 $html = HTML::Entities::encode_entities($html);
新 $html = HTML::Entities::encode_entities($html,"\'\"<>&");

クロスサイトスクリプティング対策を考えると、これで良いと思うのだが...

追記2

色々試行錯誤したが、mt.cfg内で NoHTMLEntities 1 にすれば解決することがわかった。

投稿者 かつ : 2004年08月19日 09:29

この記事のトラックバックURL

トラックバック一覧 (2件)

  1. コメント文字化けに当たって from Confession For Exist

     とりあえず、ぐぐってみて思い当たりそうなものは片っ端から試してみました。  と...

    トラックバック時刻 : 2004年11月24日 18:03

  2. ブログタイトルの文字化け from お気楽極楽ブログ

    ハタと気づいたら、 ブログタイトルが文字化けしていることに気づきました...

    トラックバック時刻 : 2005年05月05日 11:54

コメント一覧 (28件)

  1. Great website. Let me just quickly recap Listen, theres more. Lots more. vaigra
    generic canada

    投稿者 Mostcomment : 2008年04月08日 02:37

  2. Think about it Are we crazy? More about that later. viagera
    order cheap

    投稿者 Goodnews : 2008年04月08日 21:45

  3. Eh.. Sure Ive tried this. Thanks a lot! vigra
    cialis

    投稿者 jennyfersy : 2008年04月09日 18:37

  4. Think about it Heres the secret thanks for posting this. vagra
    buy usa

    投稿者 Usavagra : 2008年04月09日 19:47

  5. Think about it Heres the secret thanks for posting this. vagra
    buy usa

    投稿者 Usavagra : 2008年04月09日 19:48

  6. Think about it Heres the secret thanks for posting this. vagra
    buy usa

    投稿者 Usavagra : 2008年04月09日 19:48

  7. Think about it I havent heard of this before actually. All the best! discount drugs without prescription

    投稿者 lavitrabuy : 2008年04月19日 00:58

  8. amaurosis diclidantheraceae pneumonectasia cyanhydrin taisch postvenous auriferous canephor
    Thin Solid Films
    http://www.acenico.com.ng/

    投稿者 Clyde Joseph : 2008年04月20日 05:19

  9. amaurosis diclidantheraceae pneumonectasia cyanhydrin taisch postvenous auriferous canephor
    Ali Zayn l-Abidin
    http://oikos.com/library/index.html

    投稿者 Kathryn Wallace : 2008年04月21日 19:12

  10. 韆矼 碌繻!

    羅珞珥邇 鴦 邇 鞳蓚 矗 闔袱艢鴾 關蒻鉉逶 騾蜥 跪瘉譛逶 鱚諷鉈瑪!
    呶 繿鴾 [url=http://gsmtricks.ua]袱鰰謗 跪瘉譛逶 鱚諷鉈鈞[/url] 關蔟繻 跪粤諷 瘤諷 3000!
    尖鉈蓐琿 銜關珥袱 骭 闔 碌繻 跏頌, 跂謗粫, 袱頏蓁褂, 闔謌鉈 跋釿鈬 粽黹鈬..
    籥 闔鱶 艢癪 - 騾跪 站珥邇 闔髓迯 釶邇硅纃 邇碆髓繪 跪瘉譛逶 鱚諷鉈瑪, 釶芬顋 鰰 籥諷..

    呀 鴈 關銹 闔骭銜鞳鴾 www.gsmtricks.ua

    P.S. 繿謌 辣 鱚踈 轢闊騾 關銹 閻鞳跂髓蓿 逑肭龠 袱鱚竡韆.

    投稿者 www.gsmtricks.ua : 2008年05月01日 18:45

  11. 沃 騾蜥 碆 gsmzone.com.ua 跋釿 碌褌竡 跪瘉譛邇竡 褌迺纃鰰 關蔟繻 碌 袱璢鴆 關跪 騾蜥 租冢棒厖!
    呶 鞳琺邇 跋釿 [url=http://gsmzone.com.ua] java-蓊 跂謗粫 粳 鱚諷鉈鈞[/url], 邇碆髓繪 跪瘉譛逶 鱚諷鉈瑪.
    釶繻 關鉐鴈 邇韭琺逶 騾蜥 粳 譫粤!

    投稿者 gsmzone.com.ua : 2008年05月13日 04:45

  12. 廷瘰釿 碚繻辣辷 體鴈.
    韲 關銷纃 繿謌 轢闊騾 辣 鱚踈, 關鉐鴈 銜繼 鴈 癪 碼 芻琺 鴈 碌 鰰褂 繿鴾 騾蜥 粳 譫粤.
    卓 轢關蓐辮 騾蜥 關 [url=http://telefon.com.ua]跪瘉譛逶 鱚諷鉈[/url] - [b]www.telefon.com.ua[/b]
    鴈 鴦 繿鴾?
    -[url=http://telefon.com.ua/mobil_catalog.php] 袱鰰謗 跪瘉譛逶 鱚諷鉈鈞[/url]
    - 闔髓迯 邇碼 [url=http://telefon.com.ua/article/]釶芬顋 鱚諷鉈鈞[/url]
    -[url=http://telefon.com.ua/news/] 跪瘉譛逶 邇碆髓[/url]
    鰰裝 [u]蓁鴆頌襁蓙 粳 鱚諷鉈鈞[/u], 鈿蔡琿蒹 驟褓纈鈞 跪瘉謗, 褌辣邇 聽 琿鉈蓐轢 銜關珥袱 骭 騾蜥!
    呀 鴈 癈糂 鞐 矗 礦粤鴾 轢 騾蜥.
    淘謌 轢闊騾 辣 鴈 鞐舮繼 關銹 閻鞳辣髓 關珥蓚逶.

    投稿者 telefon.com.ua : 2008年05月19日 22:00

  13. Heh. Nice. I even talk about that fact further down the page. :). Its a pretty well known among the organic types like me. viagara buy uk That [url=http://a-cash.info/vaigra/site_map.html]vaigra kamagra[/url] and anyway thanks for the post.

    投稿者 iceppiorb : 2008年06月05日 21:49

  14. Hello! Every imperative work! :)
    charming locality, creditable mdance ;)
    I like it ;)

    投稿者 Cilais : 2008年06月07日 18:29

  15. Very interesting site. However, the problem is More about that later. viagara
    prescription canada

    投稿者 Viagara_man : 2008年06月11日 23:51

  16. 匁跪 鰰褌竡 騾蜥 辣 關鉗粤, 黽 鱚 瘤諷 辣 艢癈粤 鉐鰰礦鴾 銜謌逶 銜茆, 袱 粤諤 鴈 碌! 騾蜥 關珥糂 逑肭! 關蓊諤珱 闔驟鱶鴾 跪 [url=http://www.fatan.ru/]踈茆袱譛逶[/url] 騾蜥....

    投稿者 fatanu : 2008年06月12日 11:19

  17. I am sure that there are plenty of positives out there, but what have you seen for yourself?

    If you think it's nothing, think again





    Listen, theres more. Lots more.



    vigra
    levitra vs

    投稿者 crazyvigra : 2008年06月13日 18:20

  18. OK, let me repeat that

    I don't care.





    Thanks!


    vigra
    female version of

    投稿者 Goodlyn : 2008年06月25日 20:13

  19. Hello!

    Im still hoping there will be more posts on this blog.





    All the best!


    vagra
    generic online

    投稿者 Prodigyn : 2008年06月26日 06:10


  20. http://divinemine.blog.creep.ru/ - 邃 驫瑾瑩 闔謐鉤纈鞐肭鈬 闔齏

    [url=http://divinemine.blog.creep.ru/]粤鴆褂 闔齏 銜釿鞐蓙[/url]
    瘤譛鈬 闔齏 礦粤

    投稿者 Frandaacago : 2008年08月02日 00:07

  21. 凰謗 袱跏邇 倥蛹蒻 關繖諤窶纈 蒡鉅蓍 碼瘤 袱跏邇 闔 騾踵 辷芒蓐 纃瑕.

    [url=http://www.remix-kamin.ru/]袱跏逶[/url]

    倥蛹蒻


    投稿者 remix8754 : 2008年08月12日 22:47

  22. 野聽 跋 褞 辷鴾 驫瑯瑩 蓁粤襃 逑聽 闔譫瘤踈 蓚 袱? 呷 鴈 闊骼跪 粮蜆纈 粮 野驫碼 鴈 骰鈬 粤謗, 碆 褥籥辷鴾 卓韲辣, 痳 蓁粤襃 粮蜆纈?
    .. 砒 鴈 髓鞐辷 [url=http://www.ruzip.com/]鋏鴈碼 蓁粤襃 野驫碼 碌繪 們髑蓙[/url], 逑 繿謌 鴈譛褌 辣 粮蜥纈... ;)


    投稿者 Rnder123 : 2008年08月20日 12:38

  23. Thank you!Your site is very nice [url=鏤http://livedeal.com/ShowItemDetail?id=67336403][/url]

    投稿者 viagra tng : 2008年09月11日 00:06

  24. Because people with something worthwhile to say typically dont say things unless they have something worthwhile to say.
    http://www.bestgiftsher.com/ipod/ipod-add.html

    投稿者 Jenny Barnes : 2008年09月19日 09:23

  25. Because people with something worthwhile to say typically dont say things unless they have something worthwhile to say.
    http://www.bestgiftsher.com/ipod/ipod-add.html

    投稿者 Jenny Barnes : 2008年09月19日 09:24

  26. How to promote a friends (subscription) course on how to become a successful blogger which repeats the same ad nauseum - ProBlogger
    http://www.bass-fishing.biz/blog/lucas-on-bass-fishing.html

    投稿者 Jenny Barnes : 2008年09月22日 07:21

  27. I dont know how you forgot about Gary Conn. Tell everyone to unsubscribe to your blog and make 20 posts a day thereafter about random shit to get more clicks to the teet he sucks on aka Hostgator.
    http://www.naghtylatinavideos.com/adult-entertainement.html

    投稿者 Jenny Barnes : 2008年09月24日 01:08

  28. 韆矼 碌繻.. 艢驤粤鞫 粮赭, 碌 轢粮繼, 褌跫, 踈茆袱, 闊碆, 痳苟鉈逶 邇.[url=http://www.erotic-foto.com/].[/url]. 鋏纈 銜粮逑鴾 髀鉅鉗邇, 齣譖瑩 關葹鉗 碆糴... 闔闍珥瑩 竡譖鉤, 闔關蔡鰰矗鴾 釶轢羝迯 艢竡鞳譖 粤碵袱.. [url=http://www.erotic-foto.com/].[/url]. 鞳 褞 闔糀袱聽 褥籥 謫 闔纒瑩 轢 閠頌 辣粤譛? 鰰 鴈 辣 驤譛邇 粮韲竡 碌 鴈 癪謗 艢 鴈 辷繝 辣癪謗 [url=http://www.erotic-foto.com/]:)[/url]))

    投稿者 Onekeepay : 2008年10月04日 15:02

新規にコメントする




情報を登録する?



年間カレンダー
2007
12
 
11
1
10
1
09
1
08
 
07
 
06
 
05
 
04
3
03
7
02
3
01
4
2006
12
1
11
1
10
1
09
1
08
1
07
1
06
1
05
2
04
1
03
1
02
1
01
1
2005
12
1
11
1
10
4
09
2
08
1
07
2
06
3
05
7
04
4
03
8
02
6
01
10
2004
12
8
11
14
10
10
09
20
08
12
07
2
06
4
05
2
04
1
03
1
02
1
01
1
2003
12
1
11
1
10
1
09
1
08
1
07
1
06
2
05
2
04
3
03
3
02
7
01
3
2002
12
5
11
3
10
3
09
4
08
7
07
6
06
10
05
7
04
4
03
4
02
8
01
8
2001
12
6
11
12
10
18
09
6
08
 
07
 
06
 
05
 
04
 
03
 
02
 
01
 
2004年08月
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

サイト内の検索

このBlogのライセンス