<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No Meaning Developer &#187; SyntaxHighlighter</title>
	<atom:link href="http://kentreez.com/blog/tag/syntaxhighlighter/feed/" rel="self" type="application/rss+xml" />
	<link>http://kentreez.com/blog</link>
	<description>kentreez&#039;s blog</description>
	<lastBuildDate>Tue, 05 Jul 2011 16:13:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WP-Plugin SyntaxHighlighter Evolved และ htmlspecialchars</title>
		<link>http://kentreez.com/blog/uncategorized/syntaxhighlighter/</link>
		<comments>http://kentreez.com/blog/uncategorized/syntaxhighlighter/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 05:00:51 +0000</pubDate>
		<dc:creator>kentreez</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SyntaxHighlighter]]></category>

		<guid isPermaLink="false">http://www.kentreez.com/blog/?p=105</guid>
		<description><![CDATA[สืบเนื่องจากผมไปเจอปลั๊กอินเวิร์ดเพลสตัวนึงครับ มันมีชื่อว่า SyntaxHighlighter Evolved เลยทำให้ผมอยากกลับมาเขียนบล๊อคนี้ต่อ หลังจากทิ้งไปนานมากๆ ซึ่งมันรองรับภาษามากมายครับ สามารถดูทั้งหมดได้จากที่นี่เลย http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes แต่ประเด็นจริงๆ ที่ทำให้ผมเขียน post เป็นเพราะว่า ผมมีปัญหากับ htmlspecialchars ครับ เหมือนว่ามันทำซับซ้อนกับ Wordress ผมพยายามหาทางตั้งค่าใน Settings ของทั้ง 2 ตัว (WordPress และ syntaxhighlighter) แต่ก็ไม่เจอที่จะให้ตั้งค่าเรื่อง encode เลย สุดท้ายผมเลยต้องเข้าไปแก้ในไฟล์ syntaxhighlighter.php ครับ File: ./wp-content/plugins/syntaxhighlighter/syntaxhighlighter.php ผมเข้าไปลบคำสั่ง htmlspecialchars นี้ออกไป หากใครมีวิธีแก้ที่ถูกต้องโปรดชี้แนะด้วยนะครับ แก้โค๊ดไปแบบนี้ กลัวไปกระทบส่วนอื่นจัง]]></description>
			<content:encoded><![CDATA[<p>สืบเนื่องจากผมไปเจอปลั๊กอินเวิร์ดเพลสตัวนึงครับ มันมีชื่อว่า <a href="http://wordpress.org/extend/plugins/syntaxhighlighter/">SyntaxHighlighter Evolved</a> เลยทำให้ผมอยากกลับมาเขียนบล๊อคนี้ต่อ หลังจากทิ้งไปนานมากๆ</p>
<p>ซึ่งมันรองรับภาษามากมายครับ สามารถดูทั้งหมดได้จากที่นี่เลย<br />
<a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes">http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes</a></p>
<p>แต่ประเด็นจริงๆ ที่ทำให้ผมเขียน post เป็นเพราะว่า ผมมีปัญหากับ htmlspecialchars ครับ เหมือนว่ามันทำซับซ้อนกับ Wordress<br />
<span id="more-105"></span></p>
<p>ผมพยายามหาทางตั้งค่าใน Settings ของทั้ง 2 ตัว (WordPress และ syntaxhighlighter) แต่ก็ไม่เจอที่จะให้ตั้งค่าเรื่อง encode เลย  สุดท้ายผมเลยต้องเข้าไปแก้ในไฟล์ syntaxhighlighter.php ครับ</p>
<p>File: ./wp-content/plugins/syntaxhighlighter/syntaxhighlighter.php</p>
<pre class="brush: php; title: ; notranslate">
// The callback function for SyntaxHighlighter::encode_shortcode_contents()
function encode_shortcode_contents_callback( $atts, $code = '', $tag = false ) {
    return '[' . $tag . $this-&gt;atts2string( $atts ) . ']' . htmlspecialchars( $code ) . &quot;[/$tag]&quot;;
}
</pre>
<p>ผมเข้าไปลบคำสั่ง htmlspecialchars นี้ออกไป</p>
<pre class="brush: php; title: ; notranslate">
// The callback function for SyntaxHighlighter::encode_shortcode_contents()
function encode_shortcode_contents_callback( $atts, $code = '', $tag = false ) {
    return '[' . $tag . $this-&gt;atts2string( $atts ) . ']' . ( $code ) . &quot;[/$tag]&quot;;
}
</pre>
<p>หากใครมีวิธีแก้ที่ถูกต้องโปรดชี้แนะด้วยนะครับ แก้โค๊ดไปแบบนี้ กลัวไปกระทบส่วนอื่นจัง <img src='http://kentreez.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kentreez.com/blog/uncategorized/syntaxhighlighter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

