<?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>FAQforge &#187; Wordpress</title> <atom:link href="http://www.faqforge.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" /><link>http://www.faqforge.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Fri, 03 Feb 2012 13:47:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>How to avoid that wordpress replaces &#8212; with &#8211; in HTML</title><link>http://www.faqforge.com/linux/how-to-avoid-that-wordpress-replaces-with-in-html/</link> <comments>http://www.faqforge.com/linux/how-to-avoid-that-wordpress-replaces-with-in-html/#comments</comments> <pubDate>Wed, 05 Aug 2009 12:01:13 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[Wordpress]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=119</guid> <description><![CDATA[If you run a blog that covers topics from Linux / Unix like we here at FAQforge and you include Linux shell commands in a wordpress post, you might have noticed that WordPress replaces the char combination &#8220;&#8211;&#8221; with &#38;#8211; in the HTML sources. But the replacement &#38;#8211; is displayed by the browser as &#8220;-&#8221; [...]]]></description> <content:encoded><![CDATA[<p>If you run a blog that covers topics from Linux / Unix like we here at FAQforge and you include Linux shell commands in a wordpress post, you might have noticed that WordPress replaces the char combination &#8220;&#8211;&#8221; with &amp;#8211; in the HTML sources. But the replacement &amp;#8211; is displayed by the browser as &#8220;-&#8221; and not &#8220;&#8211;&#8221;. So if someone copys your shell command examples to execute them, they will not work. To fix this behaviour, edit the file wp-includes/formatting.php in wordpress and replace the lines 55 and 56:</p><p
class="system">$static_characters = array_merge(array(&#8216;&#8212;&#8217;, &#8216; &#8212; &#8216;, &#8216;&#8211;&#8217;, &#8216; &#8211; &#8216;, &#8216;xn&amp;#8211;&#8217;, &#8216;&#8230;&#8217;, &#8216;&#8220;&#8217;, &#8216;\&#8217;s', &#8216;\&#8217;\&#8221;, &#8216; &#8482;&#8217;), $cockney);<br
/> $static_replacements = array_merge(array(&#8216;&amp;#8212;&#8217;, &#8216; &amp;#8212; &#8216;, &#8216;&amp;#8211;&#8217;, &#8216; &amp;#8211; &#8216;, &#8216;xn--&#8217;, &#8216;&amp;#8230;&#8217;, $opening_quote, &#8216;&amp;#8217;s&#8217;, $closing_quote, &#8216; &amp;#8482;&#8217;), $cockneyreplace);</p><p>with:</p><p
class="system">$static_characters = array_merge(array(&#8216;&#8212;&#8217;, &#8216; &#8212; &#8216;, &#8216;xn&amp;#8211;&#8217;, &#8216;&#8230;&#8217;, &#8216;&#8220;&#8217;, &#8216;\&#8217;s', &#8216;\&#8217;\&#8221;, &#8216; &#8482;&#8217;), $cockney);<br
/> $static_replacements = array_merge(array(&#8216;&amp;#8212;&#8217;, &#8216; &amp;#8212; &#8216;, &#8216;xn--&#8217;, &#8216;&amp;#8230;&#8217;, $opening_quote, &#8216;&amp;#8217;s&#8217;, $closing_quote, &#8216; &amp;#8482;&#8217;), $cockneyreplace);</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/how-to-avoid-that-wordpress-replaces-with-in-html/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/21 queries in 0.012 seconds using disk: basic
Object Caching 276/372 objects using disk: basic

Served from: www.faqforge.com @ 2012-02-04 23:19:47 -->
