<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -82,27 +82,20 @@
 		public function embed_tag_for($post, $max_width = 500) {
 			$post-&gt;embed = preg_replace(&quot;/&amp;([[:alnum:]_]+)=/&quot;, &quot;&amp;amp;\\1=&quot;, $post-&gt;embed);
 
-			if (preg_match(&quot;/width=(\&quot;|')([0-9]+)(\&quot;|') height=(\&quot;|')([0-9]+)(\&quot;|')/&quot;, $post-&gt;embed, $scale)) {
-				$match  = $scale[0];
-				$width  = $scale[2];
-				$height = $scale[5];
+			if (preg_match(&quot;/width(=\&quot;|='|:\s*)([0-9]+)/&quot;, $post-&gt;embed, $width)) {
+				$sep_w = $width[1];
+				$original_width = $width[2];
+			} else
+				return $post-&gt;embed;
 
-				$new_height = (int) (($max_width / $width) * $height);
+			if (preg_match(&quot;/height(=\&quot;|='|:\s*)([0-9]+)/&quot;, $post-&gt;embed, $height)) {
+				$sep_h  = $height[1];
+				$original_height = $height[2];
 
-				return str_replace($match, 'width=&quot;'.$max_width.'&quot; height=&quot;'.$new_height.'&quot;', $post-&gt;embed);
+				$new_height = (int) (($max_width / $original_width) * $original_height);
 			}
 
-			if (preg_match(&quot;/width:([0-9]+)(px)?;(\s*)height:([0-9]+)(px)?;?/&quot;, $post-&gt;embed, $scale)) {
-				$match  = $scale[0];
-				$width  = $scale[1];
-				$height = $scale[4];
-				$px     = $scale[2];
-				$space  = $scape[3];
-
-				$new_height = (int) (($max_width / $width) * $height);
-
-				return str_replace($match, 'width:'.$max_width.$px.';'.$space.'height:'.$new_height.$px.';', $post-&gt;embed);
-			}
+			$post-&gt;embed = str_replace(array($width[0], $height[0]), array(&quot;width&quot;.$sep_w.$max_width, &quot;height&quot;.$sep_h.$new_height), $post-&gt;embed);
 
 			return $post-&gt;embed;
 		}</diff>
      <filename>feathers/video/video.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9eea494f1f3622490e456f7e78f4c570886b8f8c</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/c052e58651a3931fae92a12ae359981932c59f20</url>
  <id>c052e58651a3931fae92a12ae359981932c59f20</id>
  <committed-date>2008-08-28T16:44:59-07:00</committed-date>
  <authored-date>2008-08-28T16:44:59-07:00</authored-date>
  <message>A more dynamic video embed_tag_for scaling method. Closing #196 since it was indirectly affected (its actual issue has already been fixed). [#196 state:resolved]</message>
  <tree>9045b80423aad9f4dcd899262d358b22fd7ba832</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
