<?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>Flassari.is &#187; line</title>
	<atom:link href="http://flassari.is/tag/line/feed/" rel="self" type="application/rss+xml" />
	<link>http://flassari.is</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Jul 2010 16:09:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress replaces -- with –</title>
		<link>http://flassari.is/2009/11/wordpress-replaces-two-hyphens-with-one/</link>
		<comments>http://flassari.is/2009/11/wordpress-replaces-two-hyphens-with-one/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:57:37 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[--]]></category>
		<category><![CDATA[arrow]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[formatting.php]]></category>
		<category><![CDATA[hyphen]]></category>
		<category><![CDATA[hyphens]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[swfobject]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[–]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=202</guid>
		<description><![CDATA[I just recently upgraded my wordpress system, and now it does not show my embedded flash at all. I would be surprised, but this isn't the first time this happens.
The last time I upgraded I found a blog post on how to fix it, but it's been a while and I just can't find that post any more, so I'm writing my own. [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently upgraded my wordpress system, and now it does not show my embedded flash at all. I would be surprised, but this isn&#8217;t the first time this happens.<br />
The last time I upgraded I found a blog post on how to fix it, but it&#8217;s been a while and I just can&#8217;t find that post any more, so I&#8217;m writing my own.</p>
<p>So this is the deal: I always embed my flash using the html code that <a href="http://code.google.com/p/swfobject/wiki/documentation#How_to_embed_Flash_Player_content_using_SWFObject_static_publish">SWFobject recommends</a>:</p>
<pre class="brush: html">
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420"&gt;
  &lt;param name="movie" value="myContent.swf" /&gt;
  &lt;!--[if !IE]&gt;--&gt;
  &lt;object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420"&gt;
  &lt;!--&lt;![endif]--&gt;
    &lt;p>Alternative content&lt;/p&gt;
  &lt;!--[if !IE]&gt;--&gt;
  &lt;/object&gt;
  &lt;!--&lt;![endif]--&gt;
&lt;/object&gt;
</pre>
<p>After the upgrade, instead of my pretty flash objects I get this funky arrow in my posts:</p>
<pre>
–&gt;
</pre>
<p>And if I look at the source, it now looks like this:</p>
<pre class="brush: html">
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420"&gt;
  &lt;param name="movie" value="myContent.swf" /&gt;
  &lt;!--[if !IE]&gt;&amp;#8211;&gt;
  &lt;object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420"&gt;
  &lt;!--&lt;![endif]--&gt;
    &lt;p>Alternative content&lt;/p&gt;
  &lt;!--[if !IE]&gt;&amp;#8211;&gt;
  &lt;/object&gt;
  &lt;!--&lt;![endif]--&gt;
&lt;/object&gt;
</pre>
<p>Apparently wordpress replaces<br />
&lt;!--[if !IE]&gt;<span style="color: #006600; font-weight: bold;">--</span>&gt;<br />
with<br />
&lt;!--[if !IE]&gt;<span style="color: red; font-weight: bold;">&amp;#8211;</span>&gt;, but when I look into my post to edit it, it still looks fine there.</p>
<p>The reason is that wordpress is trying to make your writing prettier, even if you don&#8217;t use the wysiwyg editor. To stop wordpress from doing that, go into your wordpress directory and edit the file wp-includes/formatting.php. On lines 55 and 56 (for version 2.8.5) you should see this text:</p>
<pre class="brush: php">
$static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn&amp;#8211;', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
$static_replacements = array_merge(array('&amp;#8212;', ' &amp;#8212; ', '&amp;#8211;', ' &amp;#8211; ', 'xn--', '&amp;#8230;', $opening_quote, '&amp;#8217;s', $closing_quote, ' &amp;#8482;'),
</pre>
<p>If not, just look for it, it should be in the top page or two.<br />
Now all you have to do is comment out the array elements you don&#8217;t want wordpress to replace. My lines look like this:</p>
<pre class="brush: php">
$static_characters = array_merge(array(/*'---', ' -- ', '--', ' - ', */'xn&amp;#8211;', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
$static_replacements = array_merge(array(/*'&amp;#8212;', ' &amp;#8212; ', '&amp;#8211;', ' &amp;#8211; ', */'xn--', '&amp;#8230;', $opening_quote, '&amp;#8217;s', $closing_quote, ' &amp;#8482;'),
</pre>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2009/11/wordpress-replaces-two-hyphens-with-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
